How to display and download attachments through Service Portal

KeturP
Kilo Contributor

I am displaying a custom table which has attachments through the Service Portal and am trying to achieve 4 things but am stuck on how to accomplish

1- View attachment when View button clicked

2- Download attachment when download clicked

3- display extension type of attachment onto the list

4- display the size of the attachment onto the list.

 

 

find_real_file.png

 

 

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Can you share the current script how you are showing the above form?

Is it via UI page or widget?

please share those

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Through a widget.  Currently its a simple server side script querying the custom table and displaying values on the list.  But where I am stuck is the attachments field information as the custom table attachment field I cannot see the extension type data as well as size.  Also how to create/download attachments through the portal side interface.

Hi,

not much sure on the view part

but for download part you can add the link to attachment record for each button for respective record and once user clicks that download button it would download the file

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

KeturP
Kilo Contributor

Thanks Ankur, 

I am able to get download working.

 

1- View attachment when View button clicked

2- Download attachment when download clicked - COMPLETED

3- display extension type of attachment onto the list

4- display the size of the attachment onto the list.