mirror of
https://github.com/minio/minio.git
synced 2025-11-07 21:02:58 -05:00
ignore x-amz-storage-class when its set to STANDARD (#19154)
fixes #19135
This commit is contained in:
@@ -37,6 +37,7 @@ import (
|
||||
"github.com/minio/minio/internal/bucket/lifecycle"
|
||||
"github.com/minio/minio/internal/bucket/object/lock"
|
||||
"github.com/minio/minio/internal/bucket/replication"
|
||||
"github.com/minio/minio/internal/config/storageclass"
|
||||
"github.com/minio/minio/internal/crypto"
|
||||
"github.com/minio/minio/internal/event"
|
||||
"github.com/minio/minio/internal/hash"
|
||||
@@ -1509,6 +1510,11 @@ func (er erasureObjects) putObject(ctx context.Context, bucket string, object st
|
||||
userDefined["content-type"] = mimedb.TypeByExtension(path.Ext(object))
|
||||
}
|
||||
|
||||
// if storageClass is standard no need to save it as part of metadata.
|
||||
if userDefined[xhttp.AmzStorageClass] == storageclass.STANDARD {
|
||||
delete(userDefined, xhttp.AmzStorageClass)
|
||||
}
|
||||
|
||||
// Fill all the necessary metadata.
|
||||
// Update `xl.meta` content on each disks.
|
||||
for index := range partsMetadata {
|
||||
|
||||
Reference in New Issue
Block a user