A view return DownloadResponse which itself carries a file wrapper. Here are file wrappers distributed by Django and django-downloadview.
Django itself provides some file wrappers [1] you can use within django-downloadview:
django-downloadview implements additional file wrappers:
Bases: django.core.files.base.File
A file in a Django storage.
This class looks like django.db.models.fields.files.FieldFile, but unrelated to model instance.
Required by django.core.files.utils.FileProxy.
Retrieves the specified file from storage and return open() result.
Proxy to self.storage.open(self.name, mode).
Saves new content to the file.
Proxy to self.storage.save(self.name).
The content should be a proper File object, ready to be read from the beginning.
Return a local filesystem path which is suitable for open().
Proxy to self.storage.path(self.name).
May raise NotImplementedError if storage doesn’t support file access with Python’s built-in open() function
Delete the specified file from the storage system.
Proxy to self.storage.delete(self.name).
Return True if file already exists in the storage system.
If False, then the name is available for a new file.
Return the total size, in bytes, of the file.
Proxy to self.storage.size(self.name).
Return an absolute URL where the file’s contents can be accessed.
Proxy to self.storage.url(self.name).
Return the last accessed time (as datetime object) of the file.
Proxy to self.storage.accessed_time(self.name).
Return the creation time (as datetime object) of the file.
Proxy to self.storage.created_time(self.name).
Return the last modification time (as datetime object) of the file.
Proxy to self.storage.modified_time(self.name).
Bases: django.core.files.base.File
Wrapper for files that live on remote HTTP servers.
Acts as a proxy.
Uses https://pypi.python.org/pypi/requests.
Always sets “stream=True” in requests kwargs.
Return the total size, in bytes, of the file.
Reads response’s “content-length” header.
Bases: django.core.files.base.File
Wrapper for files that live in memory.
Notes & references
[1] | https://docs.djangoproject.com/en/1.5/ref/files/file/ |