API Docs

S3 file storage support for Invenio.

class invenio_s3.ext.InvenioS3(app=None)[source]

Invenio-S3 extension.

Extension initialization.


Flask application initialization.


Initialize configuration.

property init_s3fs_info[source]

Gather all the information needed to start the S3FSFileSystem.

S3 file storage interface.

class invenio_s3.storage.S3FSFileStorage(fileurl, **kwargs)[source]

File system storage using Amazon S3 API for accessing files.

Storage initialization.

copy(src, *args, **kwargs)[source]

Copy data from another file instance.

If the source is an S3 stored object the copy process happens on the S3 server side, otherwise we use the normal FileStorage copy method.


Delete a file.


Initialize file on storage and truncate to given size.

save(*args, **kwargs)[source]

Save incoming stream to storage.

Just overwrite parent method to allow set the correct block size.

send_file(filename, mimetype=None, restricted=True, checksum=None, trusted=False, chunk_size=None, as_attachment=False)[source]

Send the file to the client.

update(incoming_stream, seek=0, size=None, chunk_size=None, progress_callback=None)[source]

Update a file in the file system.


File storage factory for S3.


Decorator to set the correct block size according to file size.