Merge branch 'master' into 'main'

Add Content-Type: 'application/octet-stream' for download files from Git

See merge request nitro/nitro-converter!11
This commit is contained in:
Bill 2022-07-27 16:53:55 +00:00
commit e0a1800a83

View File

@ -26,7 +26,7 @@ export class FileUtilities
const data = await fetch.default(url);
const arrayBuffer = await data.arrayBuffer();
if(data.headers.get('Content-Type') !== 'application/x-shockwave-flash') return;
if(data.headers.get('Content-Type') !== 'application/x-shockwave-flash' && data.headers.get('Content-Type') !== 'application/octet-stream') return;
if(arrayBuffer) content = Buffer.from(arrayBuffer);
}