Skip to content

Commit

Permalink
Fixed registration of custom extensions in the mime registry
Browse files Browse the repository at this point in the history
  • Loading branch information
glpatcern committed Nov 7, 2023
1 parent da71403 commit 2433d7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/mime/mime.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func init() {
// a mime type with the given extension.
// TODO(labkode): check that we do not override mime type mappings?
func RegisterMime(ext, mime string) {
mimes.Store(ext, mime)
mimes.Store(strings.TrimPrefix(ext, "."), mime)
}

// Detect returns the mimetype associated with the given filename.
Expand Down

0 comments on commit 2433d7d

Please sign in to comment.