Service portal

NarsimhaMurty1
Tera Expert

Hi,
I am stuck with these two issues when adding an attachment button in the custom widget using below tag.
<sp-attachment-button > </sp-attachment-button >


1. How to restrict user to only add images, not other files 
2. How to remove this tooltip from <sp-attachment-button > </sp-attachment-button >

NarsimhaMurty1_0-1714128073347.png

 

3 REPLIES 3

Community Alums
Not applicable

Hi @NarsimhaMurty1 ,

Can you please check the below link 

https://www.servicenow.com/community/developer-forum/sp-widget-multiple-lt-sp-attachment-button-gt-n...

 

Please mark my answer correct and helpful if this works for you

 

Thanks and Regards 

Sarthak

@Community Alums 
Thanks for replying
I have gone through this article already, that issue is different

Sunil S Kerudi
Tera Contributor

Hi @NarsimhaMurty1 ,

provide the "supported-extensions" as jpg or png in the tag

"<sp-attachment-button modal="true" supported-extensions="{{::data.supportedAttachmentExtensions}}"></sp-attachment-button>"

 

for more info refer this -> https://docs.servicenow.com/bundle/vancouver-platform-user-interface/page/build/service-portal/task/...

 

for the user to know you can provide an info icon or some text like "upload file with jpg or png extensions"

 

Please mark my answer correct and helpful if this works for you

 

Thanks and Regards 

Sunil S Kerudi