fix: need to use a reader for mime detection

This commit is contained in:
Derrick Hammer 2024-02-18 02:44:57 -05:00
parent e435e6ded5
commit 418cdf7836
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 1 deletions

View File

@ -146,7 +146,12 @@ func (s StorageServiceDefault) UploadObject(ctx context.Context, protocol Storag
} }
mimeBytes := make([]byte, 512) mimeBytes := make([]byte, 512)
_, err = io.ReadFull(data, mimeBytes)
reader, err = getReader()
if err != nil {
return nil, err
}
_, err = io.ReadFull(reader, mimeBytes)
if err != nil { if err != nil {
return nil, err return nil, err
} }