Permission Denied error with Django while uploading a file

前端 未结 4 2014
不思量自难忘°
不思量自难忘° 2020-12-23 17:01

I currently have a simple model defined, with a photoupload feature using django thumbnails plugin.

but when i try to upload it gives me the following error:

<
4条回答
  •  Happy的楠姐
    2020-12-23 17:59

    mkdir(name, mode)
    
    Exception Type: OSError at /admin/products/photo/add/
    

    but your application is deployed at

    /var/www/django_projects/gangr/../gangr/
    

    Do you have a directory path set to an absolute path "/admin/products/photo/add/" rather than something relative like "admin/products/photo/add/"?

    Check the MEDIA_ROOT and MEDIA_URL in your settings.py file.

    http://docs.djangoproject.com/en/dev/ref/settings/#media-root

提交回复
热议问题