mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #8454: added a FILE_UPLOAD_PERMISSIONS setting to control the permissoin of files uploaded by the built-in file storage system. Thanks, dcwatson.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8640 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -172,7 +172,10 @@ class FileSystemStorage(Storage):
|
||||
else:
|
||||
# OK, the file save worked. Break out of the loop.
|
||||
break
|
||||
|
||||
|
||||
if settings.FILE_UPLOAD_PERMISSIONS is not None:
|
||||
os.chmod(full_path, settings.FILE_UPLOAD_PERMISSIONS)
|
||||
|
||||
return name
|
||||
|
||||
def delete(self, name):
|
||||
|
||||
Reference in New Issue
Block a user