I am working on a site that allows a user to upload a document (not an image), which is then stored in MongoDB with GridFS. My question is... is it possible to then embed/display that document for viewing on the site? Everytime I use the createReadStream
method, it just downloads the document. I would like it to show the actual document or the document's contents on the webpage, possibly in an iframe. Maybe there is a way to make a url for the document, or access the file another way? Thanks in advance.
问问题
52 次