s3_storage#

Submodules#

Package Contents#

class s3_storage.S3Storage#

Bases: auto_archiver.core.Storage

Base class for implementing storage modules in the media archiving framework.

Subclasses must implement the get_cdn_url and uploadf methods to define their behavior.

setup() None#
get_cdn_url(media: auto_archiver.core.Media) str#

Returns the URL of the media object stored in the CDN.

uploadf(file: IO[bytes], media: auto_archiver.core.Media, **kwargs: dict) None#

Uploads (or saves) a file to the storage service/location.

This method should not be called directly, but instead through the ‘store’ method, which sets up the media for storage.

is_upload_needed(media: auto_archiver.core.Media) bool#
file_in_folder(path: str) str#