You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a custom Content-Encoding is specified in the AWS_S3_OBJECT_PARAMETERS setting it is overwritten by the encoding calculated by mimetypes. It looks like this bug was introduced in PR #122.
This could be easily fixed by only updating the Content-Encoding to the guessed encoding only if it wasn't already present in object parameters. See below:
# If the content already has a particular encoding, set it
parameters.update({'ContentEncoding': encoding})
This is an issue when you want to upload a gz file but you don't want the browser to automatically attempt to decompress it, you could work around with content-disposition but it would be better to be able to control Content-Encoding and not have it overridden by the guessed encoding.
The text was updated successfully, but these errors were encountered:
When a custom Content-Encoding is specified in the AWS_S3_OBJECT_PARAMETERS setting it is overwritten by the encoding calculated by mimetypes. It looks like this bug was introduced in PR #122.
django-storages/storages/backends/s3boto3.py
Line 421 in adefe32
This could be easily fixed by only updating the Content-Encoding to the guessed encoding only if it wasn't already present in object parameters. See below:
django-storages/storages/backends/s3boto3.py
Lines 428 to 433 in adefe32
This is an issue when you want to upload a gz file but you don't want the browser to automatically attempt to decompress it, you could work around with content-disposition but it would be better to be able to control Content-Encoding and not have it overridden by the guessed encoding.
The text was updated successfully, but these errors were encountered: