Fix mime type detection
This commit is contained in:
@@ -307,7 +307,7 @@ func getProtocol(r *http.Request) string {
|
|||||||
func detectContentType(filename string) string {
|
func detectContentType(filename string) string {
|
||||||
ext := filepath.Ext(filename)
|
ext := filepath.Ext(filename)
|
||||||
mimeType := mime.TypeByExtension(ext)
|
mimeType := mime.TypeByExtension(ext)
|
||||||
if mimeType == "" {
|
if mimeType != "" {
|
||||||
return mimeType
|
return mimeType
|
||||||
}
|
}
|
||||||
return "application/octet-stream"
|
return "application/octet-stream"
|
||||||
|
|||||||
Reference in New Issue
Block a user