Hi,

I need to show files from a network location inside a container widget. The files might be pdf,docx or an image. How can I implement it in outsystems? Is it possible to have a temporary location in outsystems to store the files? I have an API which will return the file as binary to the outsystems App. Is it possible to implement this using iframe? Also I need to delete the files after viewing. 


Thanks,

Anjitha Mohan

Hi Anjitha Mohan,

Maybe you want to take a look into this component:

https://www.outsystems.com/forge/component/1281/web-previewer/

Regards,

On the Web Previewer Component suggestion by Marco, 

The Docx previewer actually uploads the Document to Office.com. It might be a privacy issue for some people.

However the PDF Viewer and Image Viewer works Locally.


We had similar Requirements but we did not use this Plugin because we did not want the Docx file to be uploaded to Office.com


we asked the user to download the Doc file and view it in his system where as PDF and Images we showed the preview Directly.


If you use open Office instead of Microsoft Office in that  case there is a Javascript Library here https://viewerjs.org/ but this does not work for Ms Office.


If you want you may convert the Ms Office Docs to Open Office Docs in Python and Then use ViewerJS for Privacy reasons

Marco Arede wrote:

Hi Anjitha Mohan,

Maybe you want to take a look into this component:

https://www.outsystems.com/forge/component/1281/web-previewer/

Regards,

Thanks for your response.. But our client will not allow to use plugins not supported by outsystems.


coder kamath wrote:

On the Web Previewer Component suggestion by Marco, 

The Docx previewer actually uploads the Document to Office.com. It might be a privacy issue for some people.

However the PDF Viewer and Image Viewer works Locally.


We had similar Requirements but we did not use this Plugin because we did not want the Docx file to be uploaded to Office.com


we asked the user to download the Doc file and view it in his system where as PDF and Images we showed the preview Directly.


If you use open Office instead of Microsoft Office in that  case there is a Javascript Library here https://viewerjs.org/ but this does not work for Ms Office.


If you want you may convert the Ms Office Docs to Open Office Docs in Python and Then use ViewerJS for Privacy reasons

Thanks for your reply. Our client will not allow plugins not supported by outsystems. I have gone through the logic of Web previewer and found that files are being uploaded to view.officeapps.live.com, client will not allow this. I need to preview almost all types of files such as docx, pdf, png, jpg, tif, excel etc. Is all types of files can be viewed using iframe? Also their requirement is to preview the file, no option for download. Is it possible to implement it in outsystems? I am using an API to get the file as binary to outsystems app.  If I can save the file in a temporary location in outsytems, like in the resource folder, it would be nice.Also after viewing the files I need to delete the file. Is it possible to do it?