How to allow only xml/xlsx/xlam file extensions while attaching a file in catalog form

shaik riyaz1
Tera Contributor

 

 

 

 

this.angular.element("#sc_cat_item").scope().attachments.length
with above script I am able to retrieve the count of attachments before submitting the form but how to get the file name and validate their extensions before submitting the form

1 REPLY 1

Neeraj31
Mega Sage

@shaik riyaz1 Refer below post

https://www.servicenow.com/community/developer-forum/how-to-restrict-user-to-add-specific-file-exten...

 

Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!