Using node request or axios with streams to download and unpack file not handling back pressure as expected?
We have a large file around 6 GB that is decompressed to 64 GB size (OS image) that we need to download using http. We are using either node's request library or axios. File is downloaded and unpacked (piped) on the fly using following code: const downloadUsingHttp = (downloadUrl, destinationPath) => {enter code here return new Promise((resolve, reject) => { const unpackedPathWriteStream = fs.createWriteStream(destinationPath); let totalDownloadSize = 64023257088; let downloadedSize = 0; let lastProgressSent = 0; axios({ method: 'get', url: downloadUrl, responseType: 'stream', auth: { username
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.