Django-Filebrowser on Heroku S3

557 Views Asked by At

Here is the link to my repo: https://github.com/dogukantufekci/cenkerbulut

My project works fine locally.

My IAM policy is:

{
    "Version": "2012-10-17",
    "Statement": [
    {
      "Effect": "Allow",
      "Action": "s3:*",
      "Resource": "*"
    }
  ]
}

Django-Filebrowser is having 500 error when I try to use it via Grappelli Admin on Heroku and S3.

 File "/app/.heroku/python/lib/python2.7/site-packages/django/core/handlers/base.py", line 112, in get_response 
response = wrapped_callback(request, *callback_args, **callback_kwargs)

 File "/app/.heroku/python/lib/python2.7/site-packages/filebrowser/decorators.py", line 37, in decorator
if get_path('', site=site) is None:

 File "/app/.heroku/python/lib/python2.7/site-packages/filebrowser/decorators.py", line 20, in get_path
if path.startswith('.') or os.path.isabs(path) or not site.storage.isdir(os.path.join(site.directory, path)):

 File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/functional.py", line 214, in inner
return func(self._wrapped, *args)

AttributeError: 'S3BotoStorage' object has no attribute 'isdir'

WSGIRequest
path:/admin/filebrowser/browse/
0

There are 0 best solutions below