Use download file API in MobileBuildsPlugin
Summary: Facenook: Use downloadFile API in Mobile Builds plugin Reviewed By: mweststrate Differential Revision: D32922041 fbshipit-source-id: d554ed9287af3bda4329e87732ab4de67136c0d2
This commit is contained in:
committed by
Facebook GitHub Bot
parent
92f0ed67f4
commit
6aa0cef927
@@ -55,7 +55,10 @@ export const commandDownloadFileStartFactory =
|
||||
maxRedirects,
|
||||
headers,
|
||||
});
|
||||
const totalSize = response.headers['content-length'] ?? 0;
|
||||
let totalSize = parseInt(response.headers['content-length'], 10);
|
||||
if (Number.isNaN(totalSize)) {
|
||||
totalSize = 0;
|
||||
}
|
||||
|
||||
const writeStream = response.data.pipe(
|
||||
createWriteStream(dest, {autoClose: true}),
|
||||
|
||||
Reference in New Issue
Block a user