mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2026-08-08 23:34:41 +00:00
blossom: send content-type header when uploading.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@nostr/tools",
|
||||
"version": "2.23.11",
|
||||
"version": "2.23.12",
|
||||
"exports": {
|
||||
".": "./index.ts",
|
||||
"./core": "./core.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<string, string> = { 'X-SHA-256': sha256 }
|
||||
const headers: Record<string, string> = {
|
||||
'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
|
||||
|
||||
+1
-1
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user