mirror of
https://github.com/minio/minio.git
synced 2025-11-21 02:09:08 -05:00
contentType: Reply back proper contentTypes based on the file extension.
Currently the server would set 'application/octet-stream' for all objects, set this value based on the file extension transparently. This is useful in case of minio browser to facilitate displaying proper icons for the different mime data types.
This commit is contained in:
@@ -78,7 +78,7 @@ func setObjectHeaders(w http.ResponseWriter, metadata fs.ObjectMetadata, content
|
||||
// set object headers
|
||||
lastModified := metadata.Created.Format(http.TimeFormat)
|
||||
// object related headers
|
||||
w.Header().Set("Content-Type", "application/octet-stream")
|
||||
w.Header().Set("Content-Type", metadata.ContentType)
|
||||
if metadata.Md5 != "" {
|
||||
w.Header().Set("ETag", "\""+metadata.Md5+"\"")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user