Service Portal HTML Widget /sys_attachment.do display attachment fails

Dennis38
Tera Contributor

Hi,

Using the HTML widget; I have a portal page that displays images that link to external web sites. The widget displays the attachment (image) for sys admin. When I view the portal page for a non admin; the attachment (image) is not displayed. Attached is the portal display for non admin users.

<p><a href="https://www.medicare.gov/care-compare/" target="_blank"><img style="max-width: 100%; max-height: 480px;" src="/sys_attachment.do?sys_id=22d5d2872f7401108f86821df699b68d&amp;view=true" /></a></p>

Thanks!

1 ACCEPTED SOLUTION

palanikumar
Mega Sage

By default all attachments are downloaded. It is better to upload these images to System UI > Images instead of attachment.

If you need attachment to be used then you need to set below system property to false

glide.ui.attachment.force_download_all_mime_types 

There is an issue in your HTML. Use the below HTML if you continue using attachments

<p><a href="https://www.medicare.gov/care-compare/" target="_blank"><img style="max-width: 100%; max-height: 480px;" src="/sys_attachment.do?sys_id=22d5d2872f7401108f86821df699b68d&view=true" /></a></p>

Refer below kb for reference

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0725626

Thank you,
Palani

View solution in original post

2 REPLIES 2

palanikumar
Mega Sage

By default all attachments are downloaded. It is better to upload these images to System UI > Images instead of attachment.

If you need attachment to be used then you need to set below system property to false

glide.ui.attachment.force_download_all_mime_types 

There is an issue in your HTML. Use the below HTML if you continue using attachments

<p><a href="https://www.medicare.gov/care-compare/" target="_blank"><img style="max-width: 100%; max-height: 480px;" src="/sys_attachment.do?sys_id=22d5d2872f7401108f86821df699b68d&view=true" /></a></p>

Refer below kb for reference

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0725626

Thank you,
Palani

Dennis38
Tera Contributor

Thanks Palanikumar! 

When you "Insert Image" in the HTML widget; it is added as an attachment. From you reply, I see I can upload the images to System UI > Images. Then display the images using the img tag. 

<p><a href="https://www.medicare.gov/care-compare/" target="_blank"><img style="max-width: 100%; max-height: 480px;" src="MedicareGov.jpg" /></a></p>