Skip to content

Commit b9bd078

Browse files
authored
s3: add storage_class option (#117)
1 parent 6d1a2b3 commit b9bd078

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

backends/s3/s3.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,10 @@ type Options struct {
7070
// Region defaults to "us-east-1", which also works for Minio
7171
Region string `yaml:"region"`
7272
Bucket string `yaml:"bucket"`
73+
74+
// StorageClass allows setting the S3 Storage Class only when storing objects.
75+
StorageClass string `yaml:"storage_class"`
76+
7377
// CreateBucket tells us to try to create the bucket
7478
CreateBucket bool `yaml:"create_bucket"`
7579

@@ -367,6 +371,7 @@ func (b *Backend) doStoreReader(ctx context.Context, name string, r io.Reader, s
367371
putObjectOptions := minio.PutObjectOptions{
368372
NumThreads: b.opt.NumMinioThreads,
369373
SendContentMd5: !b.opt.DisableContentMd5,
374+
StorageClass: b.opt.StorageClass,
370375
}
371376

372377
// minio accepts size == -1, meaning the size is unknown.

0 commit comments

Comments
 (0)