-
-
Notifications
You must be signed in to change notification settings - Fork 867
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
Add option to detect content encoding to fix gzip uploads. Resolves #451 #453
Conversation
Codecov Report
@@ Coverage Diff @@
## master #453 +/- ##
=========================================
Coverage ? 76.08%
=========================================
Files ? 11
Lines ? 1568
Branches ? 0
=========================================
Hits ? 1193
Misses ? 375
Partials ? 0
Continue to review full report at Codecov.
|
The Django 1.8 on Python 3.3 unit test appears to be failing because it installed paramiko 2.4.0 which is officially incompatible with Python 3.3. According to the categories metadata on pypi.python.org paramiko 2.3.1 does support python 3.3 so forcing the lower version for python 3.3 installations might work to resolve this unit test failure. |
All tests are passing except for the error resolved by pull request #415 |
@skruger can you rebase this fix? |
43a5e19
to
726b2ca
Compare
@sww314 rebase complete. There were some rough conflicts. |
c5c75ad
to
3871a6a
Compare
@sww314 I saw that there were some new merge conflicts so I rebased again. Still ready for merge or further review. |
The behavior selected in the resolution of #263 has broken django storages when trying to upload normal gzip files without double compressing them or when
AWS_IS_GZIPPED=False
.AWS_DETECT_CONTENT_ENCODING
has been added to allow the behavior that was introduced last year to be used when desired. IfAWS_DETECT_CONTENT_ENCODING=True
andAWS_IS_GZIPPED=False
gzip encoded files will be stored in their uncompressed form on S3. The detect content encoding default in the storage classes isFalse
which reverses the behavior introduced in pull request #264. This default ofFalse
would appear to be the least confusing to someone in a new project trying to use django-storages to upload a .gz file.This pull request modifies the existing unit test and adds one new unit test to verify the behavior of both AWS_DETECT_CONTENT_ENCODING states in both the boto and boto3 based storage classes. The new configuration option has also been added to the documentation.