I have an issue on my Django production server.
When I try to upload images, they always go to the app/media/ folder.
However I want them to be uploaded to /mnt/data.
In the admin panel, when I upload the image, it is always uploading in the app/media/ folder.
I tried adjusting the Nginx config file and the settings.py, but I guess I am lost.
Here is my Nginx configuration:
     location /static/ {
            root /home/somthing/something/;
        }
        location /media/ {
        root /mnt/data/;
        }
and the Settings.py:
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
    # Media files
    MEDIA_URL = '/media/'
    MEDIA_ROOT = (
        os.path.join(BASE_DIR, 'media')
    )
and in my model this is how I create the image:
    pictures = models.ImageField(
            upload_to='postings/',
            verbose_name=_('Posting_picture'),
            blank=True, null=True,
            validators=[validate_image],
        )
I guess following this configuration, the uploaded picture is supposed to be in mnt/data/media/postings.
The media folder on the mnt/data/ is chmod 777, I did it when I lost hope in writing/reading the folder.
 
    