@@ -26,7 +26,7 @@ func buildInMemoryConcat(ctx context.Context, client *s3.Client, objectList []*S
2626 if err != nil {
2727 return nil , err
2828 }
29- return uploadObject (ctx , client , opts .DstBucket , opts .DstKey , data )
29+ return uploadObject (ctx , client , opts .DstBucket , opts .DstKey , data , opts . storageClass )
3030 } else {
3131
3232 sizeLimit := findMinimumPartSize (estimatedSize , largestObjectSize )
@@ -49,6 +49,7 @@ func buildInMemoryConcat(ctx context.Context, client *s3.Client, objectList []*S
4949 mpu , err := client .CreateMultipartUpload (ctx , & s3.CreateMultipartUploadInput {
5050 Bucket : & opts .DstBucket ,
5151 Key : & opts .DstKey ,
52+ StorageClass : opts .storageClass ,
5253 ChecksumAlgorithm : types .ChecksumAlgorithmSha256 ,
5354 })
5455 if err != nil {
@@ -153,12 +154,13 @@ func findLargestObject(objectList []*S3Obj) int64 {
153154 return largestObject
154155}
155156
156- func uploadObject (ctx context.Context , client * s3.Client , bucket , key string , data []byte ) (* S3Obj , error ) {
157+ func uploadObject (ctx context.Context , client * s3.Client , bucket , key string , data []byte , storageClass types. StorageClass ) (* S3Obj , error ) {
157158
158159 rc , err := client .PutObject (ctx , & s3.PutObjectInput {
159160 Bucket : & bucket ,
160161 Key : & key ,
161162 ChecksumAlgorithm : types .ChecksumAlgorithmSha256 ,
163+ StorageClass : storageClass ,
162164 Body : bytes .NewReader (data ),
163165 })
164166 if err != nil {
0 commit comments