Fix media URL extension for m4a uploads
This commit is contained in:
@@ -9,7 +9,6 @@ import (
|
||||
"errors"
|
||||
"hash/fnv"
|
||||
"io"
|
||||
"mime"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
@@ -141,10 +140,7 @@ func (fh *fshandler) Upload(fdef *types.FileDef, file io.Reader) (string, int64,
|
||||
}
|
||||
|
||||
fname := fdef.Id
|
||||
ext, _ := mime.ExtensionsByType(fdef.MimeType)
|
||||
if len(ext) > 0 {
|
||||
fname += ext[0]
|
||||
}
|
||||
fname += media.ExtensionByMimeType(fdef.MimeType)
|
||||
|
||||
fdef.Location = location
|
||||
// Use file path to create ETag. File paths are unique so will be the ETag.
|
||||
|
||||
Reference in New Issue
Block a user