Is it possible to implement document preview (JPG, GIF, PNG, TIFF, PDF, Docx, .xslx) when we right-click on a hyper link. Currently when we click on a dynamic link it opens in download mode. Our requirement is to preview document first before user perform download action.
You could probably implement the https://docs.appian.com/suite/help/19.3/Document_Viewer_Component.html Document Viewer on an interface somewhere in your workflow. This is, however, not a "right click preview" (however you imagine this to work?)
Using document viewer you can view the documents in Appian. But there are few extensions that are not rendered in this document viewer and they are automatically downloaded.
You can provide the view option beside the documents. So when the user will click on that then save the document id in the parameter and then pass it to the document viewer. If the document viewer can render that document, it will display that otherwise it will get downloaded automatically.
In addition to what the previous posters said - for picture files specifically, this would be pretty easy to accomplish just using the image display field. You would need to come up with some convention other than right-click, since nothing in Appian is able to be configured to behave specially per which mouse button is clicked - a right click (afaik) will always just pop up the in-browser context menu.
My client had a very similar request - Provide ability to *preview* documents before downloading. However, the requirement was limited to PDFs. So I used the PDF Tools plugin to Convert PDF to Image (Creates an array of images or a multi-page tiff from a PDF). Once the PDF file was converted to an array of TIFF images I just displayed the images in a a!forEach of a!documentImage components within a single a!imageField component.
There are other patterns you can consider -
For example, you can create a "browser" of your own that displays the doc and add a link specifically for downloads.
In the example figure, there's a browser setup with no docs selected.Then, in figure 2, the document is selected and the download link becomes enabled.This pattern creates some separation between the view and download operations.
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.