This question is pretty broad. I do not perform all the steps to implement the attachment view directive, but here are some pointers that may come in handy.
So that the user can upload the file, you simply add a download link. If you host the application on Amazon S3, Google Cloud Storage, or other cloud storage, check their documentation. If you download files from your server, be sure to set the Content-Disposition HTTP response header << 21>, where ORIGINAL_FILENAME is the name of the file that you want to see in the save dialog box that appears when they click the download link.
Now for the viewer.
For PDF files, I would use pdfJS. There is an angular directive for here .
You can look at something like CloudConvert for other files to convert ehm to PDF and then display them in pdfJS format, but then you probably want to also save the PDF file on your server, in addition to the source files that require additional storage. You can also use the Google Document Viewer or Office 365 Viewer as described in this answer .
source share