Skip to content
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

Inconsistent Location in AWS.S3.ManagedUpload callback #1158

Closed
fedot opened this issue Sep 25, 2016 · 3 comments · Fixed by #1420
Closed

Inconsistent Location in AWS.S3.ManagedUpload callback #1158

fedot opened this issue Sep 25, 2016 · 3 comments · Fixed by #1420

Comments

@fedot
Copy link

fedot commented Sep 25, 2016

AWS.S3.ManagedUpload callback may get Location property with url which has URI encoded pathname (/ replaced by %2F) if it's a multi-part upload.

This is response for a 6mb file upload:
s3.upload(params).send(...)

{
  "Location": "https://stream-upload-tests.s3.amazonaws.com/stream-uploads%2Fkokoko.gif",
  "Bucket": "stream-upload-tests",
  "Key": "stream-uploads/kokoko.gif",
  "ETag": "\"e05220150932565fe8ccef113eed2d8a-2\""
}

This is response for uploading same file but with only one part:
s3.upload(params,{partSize: 10 * 1024 * 1024, queueSize:1}).send(...)

{
  "ETag": "\"0a2ac29f85722128c5a55ababd53106a\"",
  "Location": "https://stream-upload-tests.s3.amazonaws.com/stream-uploads/kokoko2.gif",
  "key": "stream-uploads/kokoko2.gif",
  "Key": "stream-uploads/kokoko2.gif",
  "Bucket": "stream-upload-tests"
}
@chrisradek
Copy link
Contributor

@fedot
Thanks for reporting this. This inconsistency is happening because the multi-part upload returns the location URI encoded, whereas when the uploader does a putObject (single part) upload, we generate the Location ourselves.

We'll have to see what format the other SDKs return Location as, but we should be able to at least make it consistent across all upload calls.

@chrisradek chrisradek added the Bug label Oct 20, 2016
@ovaillancourt
Copy link

Hi! Just wanted to mention that we've noted the same issue.

We're working around it by rebuilding the url from the Bucket and Key parts of the response as those are consistent.

@lock
Copy link

lock bot commented Sep 29, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Sep 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants