Validate XML file attachment
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 05:19 AM
Hello,
We have a requirement to create catalog item that contains attachment should only accepts XML files with contains data only.
We created catalog item variable then added attribute that allows XML file however when we try to submit blank XML file it accepts.
Can anyone have idea on how to validate blank XML file attachment?
Thank you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 07:48 AM
You can utilize the out-of-the-box attachments feature in ServiceNow. Then, when the user submits the form, you can use an onsubmit client script to verify that the uploaded attachments are XML files by checking their names. Additionally, ServiceNow's out-of-the-box functionality already prevents empty file uploads.