mirror of
https://github.com/billsonnn/nitro-converter.git
synced 2024-11-26 09:20:51 +01:00
Fix 404 from URLs
This commit is contained in:
parent
f52e7773a3
commit
01575b0843
@ -19,6 +19,8 @@ export class FileUtilities
|
||||
const data = await fetch.default(url);
|
||||
const arrayBuffer = await data.arrayBuffer();
|
||||
|
||||
if(data.headers.get('Content-Type') === 'text/html') return;
|
||||
|
||||
if(arrayBuffer) content = Buffer.from(arrayBuffer);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user