diff --git a/jsr.json b/jsr.json index f3936ad..c8aa643 100644 --- a/jsr.json +++ b/jsr.json @@ -1,6 +1,6 @@ { "name": "@nostr/tools", - "version": "2.23.11", + "version": "2.23.12", "exports": { ".": "./index.ts", "./core": "./core.ts", diff --git a/nipb0.ts b/nipb0.ts index 4b86ffc..ad5c72c 100644 --- a/nipb0.ts +++ b/nipb0.ts @@ -393,7 +393,10 @@ export async function uploadBlob(server: string, blob: Blob | File, opts?: Uploa const url = new URL('/upload', server).toString() const sha256 = await computeBlobSha256(blob) - const headers: Record = { 'X-SHA-256': sha256 } + const headers: Record = { + 'X-SHA-256': sha256, + 'Content-Type': getBlobType(blob) || 'application/octet-stream', + } if (opts?.auth) { const authEvent = typeof opts.auth === 'boolean' ? await opts.onAuth?.(server, sha256) : opts.auth diff --git a/package.json b/package.json index 746bbc3..fea6d20 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "type": "module", "name": "nostr-tools", - "version": "2.23.11", + "version": "2.23.12", "description": "Tools for making a Nostr client.", "repository": { "type": "git",