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
I have new issues with PutObject (and PutObjectAsync) after upgrade to v2 preview: it seems like if you set "Content-Encoding" Header in request, corresponding file in S3 for some reason does not have such header.
It contains 2 solutions, each one use different version of AWS SDK: one without Old prefix use new version 2.0.0.1 and one with Old prefix uses stable version 1.5.28.1.
You also need to add your own configuration inside AWSConfig.cs file: AWS Key, Secret, S3 Folder, etc.
After you configure try to run both apps:
When you run Old console application, it attempts to put local file to S3 folder and succeed and resulting file have "Content-Encoding" set to "gzip". So that means that old SDK 1.5.28.1 works well with such headers.
When you run latest console application (without Old), it attempts to put local file with the same "Content-Encoding" set to "gzip", however if you check S3 you will see that there is no such header.
Note also that other Headers are set correctly by both SDK versions, for example "Cache-Control" is set to "max-age=31536000, public".
Also note that for v2 of SDK, I tried to execute putObjectRequest.Headers.ContentEncoding = "gzip"
instead of
putObjectRequest.Headers["Content-Encoding"] = "gzip"
however it does not make any difference - file in S3 still luck of such header!
Please note that basically there are no differences between 2 solutions, except different version of AWS SDK.
Any help really appreciated!
Without that I can't upload Gziped files to S3 and can't save some trees in the world! ;-)
The text was updated successfully, but these errors were encountered:
I have pushed out version 2.0.0.2 of the preview which fixes this issue of setting the Content-Encoding header in the .NET 4.5 runtime. Content-Disposition had the same problem which was fixed in this release.
I have new issues with PutObject (and PutObjectAsync) after upgrade to v2 preview: it seems like if you set "Content-Encoding" Header in request, corresponding file in S3 for some reason does not have such header.
I create repository on Github so one can reproduce issues I have (well, it's very basic console apps):
https://github.com/evereq/AWSAsyncTest
It contains 2 solutions, each one use different version of AWS SDK: one without Old prefix use new version 2.0.0.1 and one with Old prefix uses stable version 1.5.28.1.
You also need to add your own configuration inside AWSConfig.cs file: AWS Key, Secret, S3 Folder, etc.
After you configure try to run both apps:
instead of
putObjectRequest.Headers["Content-Encoding"] = "gzip"
however it does not make any difference - file in S3 still luck of such header!
Please note that basically there are no differences between 2 solutions, except different version of AWS SDK.
Any help really appreciated!
Without that I can't upload Gziped files to S3 and can't save some trees in the world! ;-)
The text was updated successfully, but these errors were encountered: