-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No thumbs generated on the list (S3) #103
Comments
which versions of grappelli, filebrowser and django are you using? |
I am having the same problem using django 1.4.1, filebrowser 3.5.0, grappelli 2.4.0. This is a problem when I am serving media from s3, it does not seem to be generating versions when you upload media. |
I am also having this problem. My implimentation involves the following versions: Looks like the thumbnail generation step fails for S3 hosted files. |
I found the issue. There is a slight bug before line 315 of the functions file. (see: https://github.com/sehmaschine/django-filebrowser/blob/master/filebrowser/functions.py#L315) Solutioninserting the following snippet before line 315 solves the problem: # Rewing the file pointer back to 0, before saving to the storage object
tmpfile.seek(0)
# Existing Code
site.storage.save(version_path, tmpfile)
return version_path Debugging the ProblemI stepped through this function printing out the exception messages until I got this: Ex: ...
return version_path
except Exception, e:
print e
return None
... |
@fyaconiello shouldn´t that snippet be part of the s3-storage engine (with django-storages) instaed of adding it to the filebrowser? |
I thought it should be part of your library, however I posted the question to the community so others can weigh in: |
Does this mean that dango-filebrowser doesn't currently work with S3? If so, what are the potential ways to solve this? |
here´s a related discussion: #40 we´re currently not working on filebrowser + s3. however, if someone comes up with a patch, we´re happy to implement it. |
Would be great if someone could clarify the change required to get this working. Is there and open pull request somewhere I can apply to django-filebrowser, django-grappelli or django-storages? Cheers! |
Since I was using sorl thumbnails in other areas of the site, I opted just to use that tag instead. Problem solved. Check out the modified template here. https://gist.github.com/madteckhead/5778759 |
This also stops thumbnail files being saved locally in your MEDIA_ROOT which has probably been set to '' resulting in fules saved in an ugly place along with your application. |
see #283 |
On /admin/filebrowser/browse/ I can't see images thumbs. I installed grappelli etc strict as documentation says. All works fine except thumb.
Their generated HTML source looks that:
The text was updated successfully, but these errors were encountered: