Skip to content

Commit

Permalink
set storage class in FS mode (minio#5779)
Browse files Browse the repository at this point in the history
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 minio#5777
  • Loading branch information
Andreas Auernhammer authored and nitisht committed Apr 6, 2018
1 parent c30f75d commit 2f20d90
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/fs-v1-metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2f20d90

Please sign in to comment.