issue saving uploaded files in django
Question: I tried the simplest way of saving files in my django media folder this is my
.conf apache wsgi configuration file

    
    
    ServerName testapplication.com
    WSGIScriptAlias / /home/seba/git/CNBLUE/supergestor/supergestor/wsgi.py
    WSGIPythonPath /home/seba/git/CNBLUE/supergestor
    
    
    Alias /static /home/seba/git/CNBLUE/supergestor/static/
    Alias /media /home/seba/git/CNBLUE/supergestor/media/
    
    <Directory /home/seba/git/CNBLUE/supergestor/supergestor>
    <Files wsgi.py>
    Require all granted
    </Files>
    </Directory>
    
    
    <Directory /home/seba/git/CNBLUE/supergestor/media/>
    Require all granted
    </Directory>
    
    
    <Directory /home/seba/git/CNBLUE/supergestor/static/>
    Require all granted
    </Directory>
    

in my settings.py file i set
MEDIA_ROOT='/home/seba/git/CNBLUE/supergestor/media/'

and MEDIA_URL=''

the media folder is at the root of my project folder, the django project being
supergestor

when i tried to upload i've got this error [Errno 13] Permission denied:
'/home/seba/git/CNBLUE/supergestor/media' i have no clue


Answer: The `MEDIA_ROOT` should set like this:

    
    
    import os
    BASE_DIR = os.path.dirname(os.path.dirname(__file__))
    MEDIA_ROOT = os.path.join(BASE_DIR, "/media")
    

And I suggest you check the directory permissions first.

