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.
How could I display a non-image file stored in MongoDB(using GridFS) on a web page?
121 Views Asked by mgvoz At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Angular Show All When No Filter Is Supplied
- Why does a function show up as not defined
- I count the time the user takes to solve my quiz using Javascript but I want the same time displayed on another page
- Set "More" "Less" font size
- Using pagination on a table in AngularJS
- How to sort these using Javascript or Jquery Most effectively
- how to fill out the table with next values in array with one button
- State with different subviews
- Ajax jQuery firing multiple time display event for the same result
- Getting and passing MVC Model data to AngularJS controller
- Disable variable in eval
- javascript nested loops waiting for user input
- .hover() seems to overwrite .click()
- How to sort a multi-dimensional array by the second array in descending order?
- How do I find the fonts that are not loading in a CORS situation ( MoovWeb )?
Related Questions in MONGODB
- Meteor MapReduce Package Error: A method named is already defined
- Token based authorization in nodejs/ExpressJs and Angular(Single Page Application)
- Big data with spatial queries/indexing
- How to recover from losing all your /data/db
- What are the benefits of using the fields option when querying in Meteor
- Node JS Async Response
- mongoose get property from nested schema after `group`
- What to use for subdocuments ID's in MongoDB?
- ORM Code First versa Database First in Production
- How to profile a Yii2 based API?
- get length of embedded document in mongoDB with jade
- Architecture: Multiple Mongo databases+connections vs multiple collections with Express
- Why are numbers being inserted into MongoDB incorrectly?
- hibernate ogm mongo db, how to get count of collection?
- C++ Mongodb driver, not working
Related Questions in EXPRESS
- mongoose get property from nested schema after `group`
- Socket.io chat application not working with express?
- Node/Express access logger from request object
- Connect to localhost:3000 from another computer | expressjs, nodejs
- How to combine ng-view with complete pages in AngularJS?
- Breaking on External Call
- Where should I do the core logic code in express js?
- Express js 4, Parse.com JSON error
- Express Router: How do I get parameters? (not URL segments)
- HAML failing in Express code
- Express - Multiparty/Formidable unable to parse files greater than 100kb on Ubuntu. Callback of Parse is not called at all
- Using Bower with Express
- Node Express Routing Problems
- Failed to decode downloaded font on expressJS/NodeJS
- Inserting template code below code in Handlebars layout.hbs
Related Questions in GRIDFS
- Mongodb to Mongodb GridFS
- Extract file from MongoDB using GridFs - file with id ### not opened for writing
- Matching result of MongoController.serve
- Download of GridFs using nodejs does not start
- Issue with downloading a file from GridFS in MongoDB/NodeJs/GridFS stack
- chrome and safari don't render images in html template served by a go server with Content-Length is set
- How to Store Images into Specified Collections in MongoDB
- Trying to use fs.get function to get the chunks in mongoDB
- How to overwrite image in mongoDB gridfs?
- How to read file contents and store it in mongo db
- Display images from gridfs with nodejs
- React + Meteor filestorage
- what is the encoding of upload .ogg file to mongodb with python?
- how can I play the ogg file from mongodb through php
- Using Gridfs under Laravel 5.3 with mongo-php-library 2.2 driver
Related Questions in MULTER-GRIDFS-STORAGE
- how to upload products form and images to MongoDB atlas server?
- Failling to read properties of the file after saving it in mongoDb
- How to handle "MongoServerError" which is causing server crash
- Getting a 500 error when send a post request from my React app using Multer
- How do I solve gridFS TypeError: Cannot read properties of undefined (reading '_id') [0] at GridFSBucketWriteStream.emitFile
- multer-gridfs error " TypeError: Cannot read properties of undefined (reading '_id') "
- Running `npm install` changes installed multer version
- Error with the _id property in GridFS storage in mongoDB while uploading files
- Gridfs file retrieval does not send the file back
- mongoose - multer - multer-gridfs-storage: The database connection must be open to store files
- Small images (<4MB) in MongoDB, should I use gridFS?
- Is there a method available to store a file in mongo under a specific directory
- Multer GridFsStorage Dynamic Configuration for Multiple MongoDB Connections
- gfs.files.findOne(): cannot find files of undefined
- Display audio file in frontend through axios get request. Nodejs Reactjs Mongodb , multer , Gridfs
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
e>