-
-
Notifications
You must be signed in to change notification settings - Fork 18
Fix #104 –– Add support for custom AWS_LOCATION or S3Boto3Storage.location #105
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
Conversation
@aaronenberg thanks for the contribution. I see you point. Your patch should work, but the tests to verify it, are missing. |
Codecov Report
@@ Coverage Diff @@
## master #105 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 4 4
Lines 69 76 +7
=====================================
+ Hits 69 76 +7
Continue to review full report at Codecov.
|
3c78ad9
to
c2e0ae3
Compare
@aaronenberg I did some changes to your pull-request. I would be ok merging this, but can you please tests this in your environment, to make sure everything is working fine? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just waiting for confirmation from @aaronenberg
…orage.location
Tested and had to swap |
🎉 |
This fix is for users who have set
S3Boto3Storage.location
to anything other than the default value of empty string. We just have to prependdefault_storage.location
toupload_path
informs.py
so theinput
-tag gets it client-side then strip it back out before passing todefault_storage.open(path)
inmiddleware.py
. We have to strip it out before this becauseS3Boto3Storage._normalize_name()
will prepend the location to the path (as it should).