I have a project where users can upload documents (not images) that are stored in MongoDB using GridFS. My question is, is there a way to display these documents on the site for viewing instead of just downloading them? I've tried using the createReadStream
method, but it only results in the document being downloaded. I'm hoping to find a solution that will allow the document or its contents to be displayed on the webpage, maybe within an iframe. Is there a method to create a URL for the document or access the file in a different way? Thank you for any assistance.