Fix 404 from URLs

This commit is contained in:
SpreedBLood 2021-03-13 21:14:31 +01:00
parent f52e7773a3
commit 01575b0843

View File

@ -19,6 +19,8 @@ export class FileUtilities
const data = await fetch.default(url); const data = await fetch.default(url);
const arrayBuffer = await data.arrayBuffer(); const arrayBuffer = await data.arrayBuffer();
if(data.headers.get('Content-Type') === 'text/html') return;
if(arrayBuffer) content = Buffer.from(arrayBuffer); if(arrayBuffer) content = Buffer.from(arrayBuffer);
} }
else else