Skip to content

Commit

Permalink
Fix data.location duplication for AWS.S3.ManagedUpload
Browse files Browse the repository at this point in the history
Fixes #553
  • Loading branch information
AdityaManohar committed Sep 30, 2015
1 parent 82aac9a commit 53459b2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/s3/managed_upload.js
Expand Up @@ -546,9 +546,10 @@ AWS.S3.ManagedUpload = AWS.util.inherit({
finishSinglePart: function finishSinglePart(err, data) {
var upload = this.request._managedUpload;
var httpReq = this.request.httpRequest;
var url = AWS.util.urlFormat(httpReq.endpoint);
var endpoint = httpReq.endpoint;
if (err) return upload.callback(err);
data.Location = url.substr(0, url.length - 1) + httpReq.path;
data.Location =
[endpoint.protocol, '//', endpoint.host, httpReq.path].join('');
upload.callback(err, data);
},

Expand Down

1 comment on commit 53459b2

@christianhaller
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job! 👍

Please sign in to comment.