Starting with V10.0, Cora SeQuence has been renamed to Cora Orchestration.
V9.6 and later
The Preview Attachment control displays the file preview either in a pop-up window or in the set location in the case window. You can preview case attachments by adding the Preview Attachment control in your form or by adding the Preview Attachment client API to the form.
Currently, preview for the following file formats is supported:
For other file formats, the system downloads the attachment file to your computer.
The preview functionality does not support Right-to-Left (RTL) languages, for example, Hebrew and Arabic.
Enable preview attachments
Set the following parameter in the Administration and Flowtime web.config file to enable or disable the attachment preview:
Set the maximum preview size
Set the following parameters in the appSettings section in the Administration and Flowtime web.config file, to add the maximum preview size for different types of attachments.
|Default maximum preview size
|PDF, JPEG, PNG, GIF, TXT, and CSV
|XLSX, DOCX, XLS, and RTF
<appSettings> <add key="PNMsoft.Sequence.Components.PreviewAttachments.AttachmentMaxSize" value="4096" /> <add key="PNMsoft.Sequence.Components.PreviewAttachments.PassThroughAttachmentMaxSize" value="1024" /> … </appSettings>
Preview attachments in a pop-up window
By enabling preview in the web.config file, one-click on the filename displays the preview in a pop-up window.
Preview attachments in a form
You can add the preview functionality to a form in two ways:
- Add a code snippet to the form source
- Add the Preview Attachment control from Toolbox
Add snippet to the form source
- In a workflow, add or edit a form or a task activity.
- Add the following script to the source in the relevant location.
<div> <sq:PreviewAttachmentView runat="server" ID="PreviewControl" Display="Static" Width="800" Height="500"></sq:PreviewAttachmentView> </div>
By default, the Display property of the Preview Attachment control is set to Static so it preserves space for the preview according to the given width and height. You can set the Display property to Dynamic to display the preview dynamically.
Add the Preview Attachment control from Toolbox
- In a workflow, edit a form or a task activity.
- Select from the Toolbox, Standard > Preview Attachment control.
Add the Preview Attachment control in the specific location in the form where you want to display the preview.
- Save the form.
Display a file in the Preview Attachment control
The Preview Attachment form control has its own client API to display a file preview in the form.
Set the following function parameters to display a file preview in the form:
|is called when a user clicks on an attachment to open a preview.
previewAttachment("85e6c44b-34df-4563-9f9f-c75037c68f12", "myfile.docx", 2147923637)
The client API has the following events:
|is called when a user closes a preview.
|is called before navigating to the previewed file.
|is called after navigating to the preview file.