diff --git a/pkg/gateway/gateway.go b/pkg/gateway/gateway.go index f5dca0069149..214737316e28 100644 --- a/pkg/gateway/gateway.go +++ b/pkg/gateway/gateway.go @@ -676,10 +676,8 @@ func (n *jfsObjects) GetObjectInfo(ctx context.Context, bucket, object string, o etag, _ = n.fs.GetXattr(mctx, n.path(bucket, object), s3Etag) } size := fi.Size() - var contentType string if fi.IsDir() { size = 0 - contentType = "application/octet-stream" } // key1=value1&key2=value2 var tagStr []byte @@ -697,7 +695,7 @@ func (n *jfsObjects) GetObjectInfo(ctx context.Context, bucket, object string, o IsDir: fi.IsDir(), AccTime: fi.ModTime(), ETag: string(etag), - ContentType: contentType, + ContentType: utils.GuessMimeType(object), UserTags: string(tagStr), UserDefined: minio.CleanMetadata(opts.UserDefined), }, nil