debugging for failed upload

This commit is contained in:
localhost 2026-03-22 15:18:55 +01:00
parent 16724a580f
commit 55bf66447e
1 changed files with 2 additions and 1 deletions

View File

@ -9,7 +9,7 @@ async function uploadVideo(video: string) {
},
body: await Bun.file(video).arrayBuffer()
})
if (!uploaded.ok) throw new Error(`failed to upload video - ${uploaded.status} (${uploaded.statusText})`)
if (!uploaded.ok) throw new Error(`failed to upload video - ${uploaded.status} (${uploaded.statusText}) ${await uploaded.text()}`)
return uploaded.url.replace(keys.endpoint, 'https://s5.archive.party')
}
@ -33,6 +33,7 @@ async function uploadImage(id: string, url: string) {
},
body: arrayBuffer
})
if (!uploaded.ok) throw new Error(`failed to upload video - ${uploaded.status} (${uploaded.statusText}) ${await uploaded.text()}`)
return uploaded.url.replace(keys.endpoint, 'https://s5.archive.party')
}