I am creating an app where any one can upload any kind of file. I store my files on AWS S3 and while viewing it returns a presigned URL. I use this URL to render images and videos(some formats only), what can I do if I want to display other file formats such as .pdf, .docx, .ppt, etc.
I have tried using google docs as an but that doesn't work. What possible options do I have, if I want to display various kinds of file formats.
CodePudding user response:
It's best to use some specialized React libraries to display these files.
For PDF, you can use something like https://www.npmjs.com/package/pdf-viewer-reactjs.
CodePudding user response:
You can use react-file-viewer or something similar.