Storage
hypha.apply.utils.storage
¶
private_file_storage
module-attribute
¶
PrivateMediaView
¶
Bases: LoginRequiredMixin
, View
Base view to configure the access to private media stored in the private storage location.
Classes inheriting from this should implement their own access requirements based on the file being served, this class will only ensure that the file is not made public to unauthenticated users.
get_media
¶
Convert the URL request to a path and then return the file object
e.g. storage_location = get_my_storage_location(request, **args, **kwargs) return self.storage.open(storage_location)