Django / File Uploads Permissions
I wrote a django app, but I have a little problem with the file permissions of the uploads files from a web form.
Basically I can upload a .mp3 file but it always keep chmod 600.
The container folder has chmod 775, and the umask is set to 022.
I'm in a shared hosting service.
Try this in your settings.py if you use Python 2:
FILE_UPLOAD_PERMISSIONS = 0644
In Python 3 octal numbers must start with 0o so the line would be:
FILE_UPLOAD_PERMISSIONS = 0o644
For more details see the documentation.
- → Django, code inside <script> tag doesn't work in a template
- → Uncaught ReferenceError: Parent is not defined
- → React - Django webpack config with dynamic 'output'
- → Put a Rendered Django Template in Json along with some other items
- → Implement shopify templates in django
- → Python Shopify API output formatted datetime string in django template
- → How to avoid being crawled/penalized by Google
- → Django: Identify the urls that provide duplicate content and set a canonical link
- → Shopify app: adding a new shipping address via webhook
- → Jquery Modal Confirmation on Django form submit for deletion of object
- → changing the size of an image with css
- → shopify_auth multi store session handling
- → How to use Shopify Python API RecurringApplicationCharge