Skip to content

Commit

Permalink
small mime parse change
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianliechti committed Jul 29, 2024
1 parent 4edb269 commit ed7f751
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/api/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func detectFileName(r *http.Request) string {
}
}

if val, _, err := mime.ParseMediaType(contentType); err == nil {
if val, _, _ := mime.ParseMediaType(contentType); val != "" {
if val, ok := typeExtensions[val]; ok {
return uuid.NewString() + val
}
Expand Down

0 comments on commit ed7f751

Please sign in to comment.