Document / Attachment Preview functionality on portal

Pooja Magadum
Tera Contributor

Hello All,

We have a requirement where client wants to preview documents which are added as attachments in the ToDo tasks list in portal. OOTB, we have options to edit, delete and download. Only for image type attachments preview option is available and not for other document types (like doc, pdf and so on..) Would like to know if any of you has done something to handle similar requirement.

find_real_file.png

 

 

find_real_file.png

 

Regards,
Pooja

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi @Pooja Magadum ,

Theres a Document Viewer which is automatically enabled for newer instances.

see here https://docs.servicenow.com/bundle/rome-servicenow-platform/page/use/using-forms/concept/Documentvie...

Perhaps you can make that work within your record producer as well, with some customization.

Other than this, you could clone/customize the widget being used to upload attachemnts within the portal and show the file content within an extra DIV, for example with img src being the base64 content of the attachment.

 

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep

View solution in original post

5 REPLIES 5

We have custom potal configured & having different-different form & attachment fields available.

our requirement is after adding all the attachments, then trying to open it , it should show the the attachment like preview it without downloading the attachments . like in ServiceNow community we will see/preview attachment.