When you include the S3BotoStorageMixin
, this package should be able to work on S3.
from filebrowser.storage import S3BotoStorageMixin
from storages.backends.s3boto import S3BotoStorage
class CustomS3BotoStorage(S3BotoStorageMixin, S3BotoStorage):
def path(self, name):
# Workaround for django-filebrowser, which requests full_path on uploaded files.
# The operation is not needed at all, since no chmod happens afterwards.
return self.url(name)
def isfile(self, name):
# Hacky performance optimization for filebrowser.
# The original isdir() method is really inefficient.
if '.' in name:
return True
return super().isfile(name)
and in settings.py
:
DEFAULT_FILE_STORAGE = 'myproject.lib.storages.CustomS3BotoStorage'