mirror of
https://github.com/minio/minio.git
synced 2025-11-09 13:39:46 -05:00
statObject: Make sure to lowercase file extensions.
This commit is contained in:
@@ -435,7 +435,7 @@ func (fs Filesystem) CompleteMultipartUpload(bucket, object, uploadID string, da
|
||||
}
|
||||
contentType := "application/octet-stream"
|
||||
if objectExt := filepath.Ext(objectPath); objectExt != "" {
|
||||
contentType = contentdb.MustLookup(strings.TrimPrefix(objectExt, "."))
|
||||
contentType = contentdb.MustLookup(strings.ToLower(strings.TrimPrefix(objectExt, ".")))
|
||||
}
|
||||
newObject := ObjectMetadata{
|
||||
Bucket: bucket,
|
||||
|
||||
@@ -155,7 +155,7 @@ func getMetadata(rootPath, bucket, object string) (ObjectMetadata, *probe.Error)
|
||||
object = sanitizeWindowsPath(object)
|
||||
}
|
||||
if objectExt := filepath.Ext(object); objectExt != "" {
|
||||
contentType = contentdb.MustLookup(strings.TrimPrefix(objectExt, "."))
|
||||
contentType = contentdb.MustLookup(strings.ToLower(strings.TrimPrefix(objectExt, ".")))
|
||||
}
|
||||
metadata := ObjectMetadata{
|
||||
Bucket: bucket,
|
||||
@@ -285,7 +285,7 @@ func (fs Filesystem) CreateObject(bucket, object, expectedMD5Sum string, size in
|
||||
}
|
||||
contentType := "application/octet-stream"
|
||||
if objectExt := filepath.Ext(objectPath); objectExt != "" {
|
||||
contentType = contentdb.MustLookup(strings.TrimPrefix(objectExt, "."))
|
||||
contentType = contentdb.MustLookup(strings.ToLower(strings.TrimPrefix(objectExt, ".")))
|
||||
}
|
||||
newObject := ObjectMetadata{
|
||||
Bucket: bucket,
|
||||
|
||||
Reference in New Issue
Block a user