-
-
Notifications
You must be signed in to change notification settings - Fork 865
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
Problem with saving file on s3 storage. How save works? #155
Comments
how is |
have you found a solution ? |
@behconsci @EssaAlshammri I do not use default_storage.open(). Instead of it I use default_storage.save(). But we removed our solution for thumbnails and we are using library |
@darkowic I'm having the same problem but in another scenario storages.backends.gs.GSBotoStorage and on google app engine, I'm getting
when I try to upload an image using ImageField I think google app engine doesn't have tempfile.py and I don't know how to include it any idea ? |
@EssaAlshammri I don't think its google's app engine problem. Its's rather on you side. But I don't have experience with this. And I guess it isn't topic of this issue. |
@darkowic I'm sorry but I thought it would be easier than opening another issue
thanks |
Ah this is #281, I didn't understand what this meant before. |
But I don't use Google app engine but boto. |
I have solved it already. 👍 |
@EssaAlshammri What was your solution on google appengine? I am facing the same issue only with large files it seems |
Since version 1.1.9+ (after fork) you changed S3BotoStorageFile _file attribute from StringIO to SpooledTemporaryFile.
In my code I use PIL for generate picture thumbnail like this:
and weird think was that it works for png but not for jpg files.
After some investigation (python-pillow/Pillow#1940) I found that there is two ways of saving files in Pillow
First way (when error is throw) call python's file write method and second no.
It works for version 1.1.8 where was use StringIO and doesn't work for newer versions where SpooledTemporaryFile is used.
Is this bug? How to fix it?
The text was updated successfully, but these errors were encountered: