Posted: 13 Feb 2018 0:11 EST Last activity: 2 Aug 2018 3:21 EDT
How to preview any attachment(docx, jpg, pdf, xlsx) that have been attached to a work object?
How can we preview any attachment (it can be of any format) that has been attached to a work object? I tried with creating a control but I'm able to preview files only with image extensions (jpg and png). It is not working for other document types.
pdf url you can get from the pxThread page, property pxThread.pxReqExportURI
fileName you need to get from the attachment pages, in .pyFileName
Problem is, this will only work on a one node solution.
Whenever the file is uploaded on one node, and viewed on another, it won't work. I guess this is because the ServiceExport folder is only populated on the node you upload to, which we reference in the pxThread.pxReqExportURI property.
if anyone knows a solution to this, please let us know.