mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
Fix StorageClass field in ListObject/ListObjectV2 response (#5766)
Fixes: #5754
This commit is contained in:
committed by
kannappanr
parent
30ab71c9d9
commit
9eb94fe8c8
@@ -315,6 +315,13 @@ func (m xlMetaV1) ToObjectInfo(bucket, object string) ObjectInfo {
|
||||
// All the parts per object.
|
||||
objInfo.Parts = m.Parts
|
||||
|
||||
// Update storage class
|
||||
if sc, ok := m.Meta[amzStorageClass]; ok {
|
||||
objInfo.StorageClass = sc
|
||||
} else {
|
||||
objInfo.StorageClass = globalMinioDefaultStorageClass
|
||||
}
|
||||
|
||||
// Success.
|
||||
return objInfo
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user