diff --git a/src/cdn/downloadUrlContents.ts b/src/cdn/downloadUrlContents.ts index 0856415..d179d54 100644 --- a/src/cdn/downloadUrlContents.ts +++ b/src/cdn/downloadUrlContents.ts @@ -26,7 +26,7 @@ export default function downloadUrlContents({ host, path, size }: {host: string, family: 4, host, path, - }, saveResponse.bind(null, path, resolve, (reason: string) => { request.abort(); reject(reason); })); + }, saveResponse.bind(null, tempFileName, resolve, (reason: string) => { request.abort(); reject(reason); })); //In case of connection errors, exit early request.on('error', (error) => {