blossom: hardcode common extension/mimetypes.

This commit is contained in:
fiatjaf
2026-05-17 13:49:24 -03:00
parent 8634f0f7d5
commit d27cf276d1
2 changed files with 115 additions and 27 deletions
+1 -2
View File
@@ -5,7 +5,6 @@ import (
"encoding/json"
"fmt"
"io"
"mime"
"net/http"
"regexp"
"strconv"
@@ -129,7 +128,7 @@ func (bs BlossomServer) handleUpload(w http.ResponseWriter, r *http.Request) {
hash := sha256.Sum256(b)
hhash := nostr.HexEncodeToString(hash[:])
mimeType := mime.TypeByExtension(ext)
mimeType := blossom.GetMIMEType(ext)
if mimeType == "" {
mimeType = "application/octet-stream"
}