Skip to content

MultipartUpload with Presigned URLs to upload parts #2393

Answered by WolfgangVogl
WolfgangVogl asked this question in Q&A
Discussion options

You must be logged in to vote

Ok - I solved my problem by generating the resulting URL myself. I found the "computeEndpointString" method in the S3Client implementation - but it's private, so I re-implemented it myself.
With the computed endpoint string, it was easy to generate the predefined URL using the GeneratePresignedUrl method from AwsClient (NOT S3Client - the methods from S3Client hide the methods from AWSClient).
Maybe this snippet will help someone else:
`
Aws::S3::Model::UploadPartRequest uploadRequest;
uploadRequest.SetBucket(myBucket);
uploadRequest.SetKey(uploadName);
uploadRequest.SetUploadId(myUploadID);
uploadRequest.SetPartNumber(currentPartNumber);

// generate URI to object (http(s)://bucket.region…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by WolfgangVogl
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant