mirror of
https://github.com/JonasunderscoreJones/fileshare.jonasjones.dev.git
synced 2025-10-22 15:09:18 +02:00
fixed error code on url upload
This commit is contained in:
parent
92489f6b7f
commit
348e07de8f
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ async function handleUrlUpload(request) {
|
|||
try {
|
||||
const fileResponse = await fetch(url);
|
||||
if (!fileResponse.ok) {
|
||||
throw new Error('Failed to fetch the file');
|
||||
return new Response('Failed to download file', { status: 500, headers: headersCORS });
|
||||
}
|
||||
|
||||
const fileBlob = await fileResponse.blob();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue