0

The project I currently work on uses Vue.js and Element UI for the frontend. We are building a system for managing documents with Django + DRF backend.

Users can upload their documents (mostly .docx/.pptx/.pdf formats) and also want to preview them. The major constraint for the application is no access to the Internet (it will work on the local network only) and, ideally, preview must happen on the frontend.

How can I achieve this? I've tried to search for libraries that can do this but to no success.

Lev
  • 146
  • 2
  • 12
  • Hi, I think you need some tools that can be combined to work on all file types. For pictures the preview should be very easy. For [.pdf files here is an answered question about stackoverflow](https://stackoverflow.com/questions/55176708/preview-pdf-image-file-before-upload). For Powerpoint files, maybe someone else can help you or you need to do some more research. – wittgenstein Nov 08 '20 at 12:48
  • Hi, @wittgenstein. Thanks for your tip! I don't mind using different tools for different types, it's just I'm unable to find offline viewers for office-like types. – Lev Nov 08 '20 at 14:52
  • As far as I know, you are only looking for scripts that you implement in your application. If you look at the example above they will [give you a good hint that base64 is used](https://mozilla.github.io/pdf.js/examples/index.html#interactive-examples). – wittgenstein Nov 08 '20 at 15:22

0 Answers0