robbederks / downzip

NPM library to enable client-side code to stream potentially large files into a zipped download
MIT License
35 stars 12 forks source link

Documentation file array format #12

Closed ricky11 closed 3 years ago

ricky11 commented 3 years ago

In the documentation it says to organize the file array in the following format

const files = [ { name: 'picture1.jpg' downloadUrl: 'http://your-download-url.com/picture1.jpg' size: 1234 // In bytes }, { name: 'picture2.jpg' downloadUrl: 'http://your-download-url.com/picture2.jpg' size: 4567 // In bytes } ]

however in the downzip.js file in node_modules their is a comment that says // Files array is in the following format: [{name: '', url: ''}, ...]

does it matter if its url or downloadUrl ?, does the order matter?

153957 commented 3 years ago

It should be downloadUrl. Here is the code using the downloadUrl: https://github.com/robbederks/downzip/blob/master/src/downzip-sw.js#L86

robbederks commented 3 years ago

Thanks for pointing this out, fixed