I have a react environment where I am uploading files in small chunks to s3. Now I am supposed to upload zips as well but in unzipped state from the browser itself.After much findings I worked out the following,
jsZip.loadAsync(zipFileAsBuffer).then(function (zip) {
Object.keys(zip.files).forEach(function (filename) {
console.log(filename)
zip.files[filename].async('string').then(function (fileData) {
})
})
})
Later when I do fileData.byteLength for chunking it gives an error saying cannot find byteLength of undefined.I assume this is because the process I am using requires buffer but instead I get blob from jsZip. How can I convert blob to buffer or if some better approach is required then please do tell.