diff --git a/pkg/storage/fs/s3ng/option.go b/pkg/storage/fs/s3ng/option.go index e2857aef213..cf8fc08ecc8 100644 --- a/pkg/storage/fs/s3ng/option.go +++ b/pkg/storage/fs/s3ng/option.go @@ -44,6 +44,15 @@ type Options struct { // Secret key for the s3 blobstore S3SecretKey string `mapstructure:"s3.secret_key"` + // UploadObjectPrefix for the s3 blobstore + S3UploadObjectPrefix string `mapstructure:"s3.upload_object_prefix"` + + // UploadMetadataPrefix for the s3 blobstore + S3UploadMetadataPrefix string `mapstructure:"s3.upload_metadata_prefix"` + + // UploadTemporaryDirectory for the s3 blobstore + S3UploadTemporaryDirectory string `mapstructure:"s3.upload_temporary_directory"` + // DisableSSL for the s3 blobstore S3DisableSSL bool `mapstructure:"s3.disable_ssl"` diff --git a/pkg/storage/fs/s3ng/s3ng.go b/pkg/storage/fs/s3ng/s3ng.go index 46d55428d29..ef5eca87a88 100644 --- a/pkg/storage/fs/s3ng/s3ng.go +++ b/pkg/storage/fs/s3ng/s3ng.go @@ -62,6 +62,9 @@ func New(m map[string]interface{}, stream events.Stream) (storage.FS, error) { WithDisableSSL(o.S3DisableSSL) tusDataStore := s3store.New(o.S3Bucket, s3.New(session.Must(session.NewSession()), s3Config)) + tusDataStore.ObjectPrefix = o.S3UploadObjectPrefix + tusDataStore.MetadataObjectPrefix = o.S3UploadMetadataPrefix + tusDataStore.TemporaryDirectory = o.S3UploadTemporaryDirectory return decomposedfs.NewDefault(m, bs, tusDataStore, stream) }