When uploading files, I am setting the upload_to
to a function that creates a path doesn't exist, and Django is creating the extra folders (with permissions I don't like).
For example,
def photo_upload_path(instance, filename):
return os.path.join('photos', str(instance.id), filename)
however, the permissions of the folder are not what I would like. Should I create the folder and set the permissions? Or is there a setting for this?
I found a post for controlling permissions of uploaded files (django / file uploads permissions), but not created directories.
Thanks for any help!