get S3 Object (pdf) and display it on a unique url based on object name
Hi, I currently have multiple pdfs held on S3 and I'm building an app where I need to display these PDFs based on the name of the object. For example, I have a pdf named photosynthesis 1.pdf, it's held in the biology/ folder and I need to display this pdf on domain.com/exams/{biology}/{photosynthesis 1.pdf}
How can I make it so that when a user visits this url, it displays the pdf related to that url on the site. Or should I approach this differently? I've tried searching but couldn't find anything that worked, I'm pretty new to S3 so I'm a little lost.
Another option I'm considering is waiting on upload thing to support pdfs and using that instead but I'm not sure when that will be ready and I need to finish the site ASAP.
Thanks
2 Replies
AWS S3 Image Upload – Vercel
Use AWS S3 to upload images to a bucket from a Next.js application.
This is for uploading but I am sure it might be similar to doing a GET
I am not fully sure I am going to be dealing with this problem next week sadly