RE: RE: How to preview document before document upload (.pptx,.docx,.xlsx,.

Anant Patil, modified 4 Years ago. New Member Posts: 2 Join Date: 5/10/20 Recent Posts

Need to preview document  on file select before file upload(.pptx,.docx,.xlsx,.mpeg) please suggest

thumbnail
Olaf Kock, modified 4 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

Doubleclick it.
Before it's uploaded to the server, the server-side software can't help you with any preview generation.

Or am I missing something?

thumbnail
Christoph Rabel, modified 4 Years ago. Liferay Legend Posts: 1555 Join Date: 9/24/09 Recent Posts

In theory it would be possible to read the file using javascript and render it. It can be done, with some browsers at least, for pdf files and images. But I am not sure if there is such a library for office files (maybe there is and I just don't know it)

If the OP has a javascript library at hand that does that for pptx, docx, ... it would be doable. You could attach the action to the file upload button in the document library.