diff --git a/pkg/fs/fs-multipart.go b/pkg/fs/fs-multipart.go index 1ee6c4754..37a6a262f 100644 --- a/pkg/fs/fs-multipart.go +++ b/pkg/fs/fs-multipart.go @@ -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, diff --git a/pkg/fs/fs-object.go b/pkg/fs/fs-object.go index b4b14bf44..471a218cf 100644 --- a/pkg/fs/fs-object.go +++ b/pkg/fs/fs-object.go @@ -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,