Open preranaB opened 6 years ago
If you are reading and validating a existing zip file without manipulate the content then it's quite easy.
You are just going to iterate over all files and validate them. There is no need to generate a new zip and take up approx 256MB extra RAM (since u already have a zip file or blob) You need the send the original zip file with ajax when uploading.
But can I send that 256 MB file directly or should I break down the file into small pieces (creating multiple zip files each containing 30-40 files and then sending it one by one)?
You can just send it as it's.
I want to send a large zip file approx. 256 MB through AJAX call to the service. But before sending the file I have to validate each file contained in the zip against parameters such as file size, file format(whether it is a valid image file) and image dimensions in each file. Do I need to use streaming mechanism to send 256 MB file? If yes, how can I achieve it with validations in place for each file using JSZip?