mirror of
https://github.com/minio/minio.git
synced 2025-01-24 05:03:16 -05:00
fix: unknow contentType for ArchiveFileHandler (#19451)
This commit is contained in:
parent
7bb0f32332
commit
a481825ae1
@ -22,7 +22,9 @@ import (
|
|||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"io"
|
"io"
|
||||||
|
"mime"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
"path/filepath"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -166,10 +168,11 @@ func (api objectAPIHandlers) getObjectInArchiveFileHandler(ctx context.Context,
|
|||||||
|
|
||||||
// New object info
|
// New object info
|
||||||
fileObjInfo := ObjectInfo{
|
fileObjInfo := ObjectInfo{
|
||||||
Bucket: bucket,
|
Bucket: bucket,
|
||||||
Name: object,
|
Name: object,
|
||||||
Size: int64(file.UncompressedSize64),
|
Size: int64(file.UncompressedSize64),
|
||||||
ModTime: zipObjInfo.ModTime,
|
ModTime: zipObjInfo.ModTime,
|
||||||
|
ContentType: mime.TypeByExtension(filepath.Ext(object)),
|
||||||
}
|
}
|
||||||
|
|
||||||
var rc io.ReadCloser
|
var rc io.ReadCloser
|
||||||
|
Loading…
x
Reference in New Issue
Block a user