Reputation:
I have some files in GridFS and I want to download them to the browser. It is my understanding that I need to take the file from GridFS and move it to the server's file system in order to send it to the browser.
Can someone point me in the right direction on how to do this? Specifically how to move the file from GridFS to the server's file system. I am using a node.js server with the Express.js module.
Upvotes: 0
Views: 1854
Reputation: 322
Extracting the file to the filesystem it is not required. Have a look at this one (it works with an image, but I think you can do the math): https://stackoverflow.com/a/9848915/733749
Upvotes: 1