class queued_storage.fields.QueuedFileField(verbose_name=None, name=None, upload_to='', storage=None, **kwargs)

Field to be used together with QueuedStorage instances or instances of subclasses.

Tiny wrapper around FileField, which provides a convenient method to transfer files, using the transfer() method, e.g.:

from queued_storage.backends import QueuedS3BotoStorage
from queued_storage.fields import QueuedFileField

class MyModel(models.Model):
    image = QueuedFileField(storage=QueuedS3BotoStorage(delayed=True))

my_obj = MyModel(image=File(open('image.png')))
# Save locally:
# Transfer to remote location:

alias of QueuedFieldFile

class queued_storage.fields.QueuedFieldFile(instance, field, name)

A custom FieldFile which has an additional method to transfer the file to the remote storage using the backend’s transfer method.


Transfers the file using the storage backend.