mirror of https://github.com/minio/minio.git
set storage class in FS mode (#5779)
This change sets the storage class of the object-info if a storage class was specified during PUT. The server now replies with the storage class which was set during uploading the object in FS mode. Fixes #5777
This commit is contained in:
parent
c30f75de28
commit
2f20d90465
|
@ -166,10 +166,14 @@ func (m fsMetaV1) ToObjectInfo(bucket, object string, fi os.FileInfo) ObjectInfo
|
|||
}
|
||||
}
|
||||
|
||||
// Extract etag from metadata.
|
||||
objInfo.ETag = extractETag(m.Meta)
|
||||
objInfo.ContentType = m.Meta["content-type"]
|
||||
objInfo.ContentEncoding = m.Meta["content-encoding"]
|
||||
if storageClass, ok := m.Meta[amzStorageClass]; ok {
|
||||
objInfo.StorageClass = storageClass
|
||||
} else {
|
||||
objInfo.StorageClass = globalMinioDefaultStorageClass
|
||||
}
|
||||
|
||||
// etag/md5Sum has already been extracted. We need to
|
||||
// remove to avoid it from appearing as part of
|
||||
|
|
Loading…
Reference in New Issue