Skip to content

Commit

Permalink
Add headObjectTemplate to the TransferManagerConfiguration. This allo…
Browse files Browse the repository at this point in the history
…ws user to pass arguments to Transfer Manager Head object calls.
  • Loading branch information
Talby committed Aug 28, 2023
1 parent 98a87de commit faa1b16
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <aws/s3/S3Client.h>
#include <aws/s3/model/PutObjectRequest.h>
#include <aws/s3/model/GetObjectRequest.h>
#include <aws/s3/model/HeadObjectRequest.h>
#include <aws/s3/model/CreateMultipartUploadRequest.h>
#include <aws/s3/model/UploadPartRequest.h>
#include <aws/s3/model/CompletedPart.h>
Expand Down Expand Up @@ -68,6 +69,11 @@ namespace Aws
* overriding the body stream, bucket, and key. If object metadata is passed through, we will override that as well.
*/
Aws::S3::Model::GetObjectRequest getObjectTemplate;
/**
* If you have special arguments you want passed to our head object calls, put them here. We will copy the template for each call
* overriding the body stream, bucket, and key. If object metadata is passed through, we will override that as well.
*/
Aws::S3::Model::HeadObjectRequest headObjectTemplate;
/**
* If you have special arguments you want passed to our create multipart upload calls, put them here. We will copy the template for each call
* overriding the body stream, bucket, and key. If object metadata is passed through, we will override that as well.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ namespace Aws
uint64_t bufferSize = m_transferConfig.bufferSize;
if (!isRetry)
{
Aws::S3::Model::HeadObjectRequest headObjectRequest;
auto headObjectRequest = m_transferConfig.headObjectTemplate;
headObjectRequest.SetCustomizedAccessLogTag(m_transferConfig.customizedAccessLogTag);
headObjectRequest.WithBucket(handle->GetBucketName())
.WithKey(handle->GetKey());
Expand Down

0 comments on commit faa1b16

Please sign in to comment.