fixed error code on url upload

This commit is contained in:
J-onasJones 2024-08-26 22:06:22 +02:00
parent 92489f6b7f
commit 348e07de8f

View file

@ -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();