core.files.storage.FileSystemStorage

class FileSystemStorage(location=None, base_url=None, file_permissions_mode=None, directory_permissions_mode=None) [source]

The FileSystemStorage class implements basic file storage on a local filesystem. It inherits from Storage and provides implementations for all the public methods thereof.

location

Absolute path to the directory that will hold the files. Defaults to the value of your MEDIA_ROOT setting.

base_url

URL that serves the files stored at this location. Defaults to the value of your MEDIA_URL setting.

file_permissions_mode

The file system permissions that the file will receive when it is saved. Defaults to FILE_UPLOAD_PERMISSIONS.

directory_permissions_mode

The file system permissions that the directory will receive when it is saved. Defaults to FILE_UPLOAD_DIRECTORY_PERMISSIONS.

Note

The FileSystemStorage.delete() method will not raise an exception if the given file name does not exist.

doc_Django
2016-10-09 18:34:44
Comments
Leave a Comment

Please login to continue.