moo.storage.CachedS3Boto3Storage
- class moo.storage.CachedS3Boto3Storage(*args, **kwargs)
S3 storage backend that saves the files locally, too.
- __init__(*args, **kwargs)
Methods
__init__(*args, **kwargs)deconstruct()Return a 3-tuple of class import path, positional arguments, and keyword arguments.
delete(name)Delete the specified file from the storage system.
exists(name)Return True if a file referenced by the given name already exists in the storage system, or False if the name is available for a new file.
generate_filename(filename)Validate the filename by calling get_valid_name() and return a filename to be passed to the save() method.
get_accessed_time(name)Return the last accessed time (as a datetime) of the file specified by name.
get_alternative_name(file_root, file_ext)Return an alternative filename, by adding an underscore and a random 7 character alphanumeric string (before the file extension, if one exists) to the filename.
get_available_name(name[, max_length])Overwrite existing file with the same name.
get_cloudfront_signer(key_id, key)get_created_time(name)Return the creation time (as a datetime) of the file specified by name.
get_default_settings()get_modified_time(name)Returns an (aware) datetime object containing the last modified time if USE_TZ is True, otherwise returns a naive datetime in the local timezone.
get_object_parameters(name)Returns a dictionary that is passed to file upload.
get_valid_name(name)Return a filename, based on the provided filename, that's suitable for use in the target storage system.
listdir(name)List the contents of the specified path.
open(name[, mode])Retrieve the specified file from storage.
path(name)Return a local filesystem path where the file can be retrieved using Python's built-in open() function.
save(name, content)Save new content to the file specified by name.
size(name)Return the total size, in bytes, of the file specified by name.
url(name[, parameters, expire, http_method])Return an absolute URL where the file's contents can be accessed directly by a web browser.
Attributes
bucketGet the current bucket.
configconnectiondefault_content_typeunsigned_connection