-
-
Notifications
You must be signed in to change notification settings - Fork 868
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
s3boto: saving media leads to infinite loop since 1.12 #1084
Comments
403 is some kind of permissions error so it seems like a misconfigurartion. In general it doesn’t seem like returning either is the correct thing to do, maybe the error needs to be re-raised. |
I digged further and I tracked it down to this part of the
and
So adding
There I agree, this would have been the better experience. |
Ah wait, I already found the docs about this: https://django-storages.readthedocs.io/en/latest/backends/amazon-S3.html#iam-policy So what remains is making this an actual error |
We discovered an issue with django-storages 1.12 where saving new files to S3 ends up in an infinite loop.
1.11.1 still works fine. A bisect between the releases pinpoints the problem to 3222c23 reverting this commit on master fixes the issue for us.
What could be the issue here? It looks like
Storage.save
in Django usesget_available_name
, which usesexists
, which is why our new file-save calls this method.The error S3 returns here is:
Which ends up leading to
True
forexists()
, so Django searches forever for a new filename.I don't know enough about the reasoning behind 3222c23 to know what the solution here is. What information do you need? More about the config? Is our bucket configuration the problem?
I'm happy to provide a PR with the fix, when I know what the possible solution could be.
The text was updated successfully, but these errors were encountered: