I'm using Django for my app development. In my setting.py file I've got following media setting
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) STATIC_URL = '/static/' MEDIA_URL = 'Media/' MEDIA_ROOT = os.path.join(BASE_DIR, MEDIA_URL)
I want to save the file in my media folder for this I'm using
excel_name_sheet = settings.MEDIA_URL+'upload_csv_file/'+ str(request.FILES['upload_bulk_data']) SaveCsvSheet.save_file(request, request.FILES['upload_bulk_data'], settings.MEDIA_URL +'upload_csv_file')
I have took file using form which I got in request.FILES['upload_bulk_data']
I want to save the csv file in media folder , In windows I'm able to save the file in media but in Linux i've got [Errno 13] Permission denied: '/Media'
I have tried to give permission using chmod but that didn't workcan you help me how can I fix this problem? it working in windows but not working in Linux