mirror of
https://github.com/osmarks/mycorrhiza.git
synced 2024-12-04 18:19:54 +00:00
Make mimetype.FromExtension case-insensitive
This commit is contained in:
parent
4cb963d47d
commit
b41a2f10d4
@ -17,7 +17,7 @@ func ToExtension(mime string) string {
|
||||
|
||||
// FromExtension returns mime-type for given extension. The extension must start with a dot.
|
||||
func FromExtension(ext string) string {
|
||||
if mime, ok := mapExt2Mime[ext]; ok {
|
||||
if mime, ok := mapExt2Mime[strings.ToLower(ext)]; ok {
|
||||
return mime
|
||||
}
|
||||
return "application/octet-stream"
|
||||
|
Loading…
Reference in New Issue
Block a user