aheckmann / gridfs-stream

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

Implement gridfs transform stream #127

Open nateevans opened 6 years ago

nateevans commented 6 years ago

It would be useful if this library had a transform stream available, for the following sort of use case:

file.pipe(gfs.createTransformStream(...)) # to write full size image to gridFs
  .pipe(resizeMyImage())
  .pipe(gfs.createTransformStream(...)) # to write thumb image to gridFs

I don't have a good enough understanding of streams yet, otherwise I would take a crack at a PR.