aheckmann / gridfs-stream

Easily stream files to and from MongoDB
MIT License
615 stars 120 forks source link

How to response multiple stream? #110

Open shalonteoh opened 7 years ago

shalonteoh commented 7 years ago

I've tried using Multistream but it doesn't seems working. I only get 1 image where i suppose to get multiple. Appreciate any recommendation. thanks.

const readstream = []; files.forEach((element) => { const stream = gfs.createReadStream({ _id: element._id, root: 'entryFiles' }); readstream.push(stream); }, this); return MultiStream(readstream).pipe(res);