cloud drive: S3 supports storage class

This commit is contained in:
Chris Lu
2021-08-23 02:18:56 -07:00
parent 188ecc079d
commit 2836a58d87
5 changed files with 165 additions and 150 deletions

View File

@@ -143,10 +143,11 @@ func (s *s3RemoteStorageClient) WriteFile(loc *filer_pb.RemoteStorageLocation, e
// Upload the file to S3.
_, err = uploader.Upload(&s3manager.UploadInput{
Bucket: aws.String(loc.Bucket),
Key: aws.String(loc.Path[1:]),
Body: reader,
Tagging: aws.String(tags),
Bucket: aws.String(loc.Bucket),
Key: aws.String(loc.Path[1:]),
Body: reader,
Tagging: aws.String(tags),
StorageClass: aws.String(s.conf.S3StorageClass),
})
//in case it fails to upload