Inbound Scripted REST API attachment issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2023 01:40 PM
Hi All,
I've created a Scripted REST API to decode the base64encode attachment and have it attached to the target record. It's working fine for .txt and .csv . However, it doesn't work with .docx/png/xlsx and gives an error while opening the file "we're sorry. we cannot open this file because we have found problem with its content, either its corrupted..etc"
* I've tried writeBase64 it doesn't work at all and the Example code provided in the document, I've tried it in Background Script. https://developer.servicenow.com/dev.do#!/reference/api/utah/server/no-namespace/c_GlideSysAttachmen...
This doesn't work.
Scripted REST API:
Kindly help me resolve this.
@Ankur Bawiskar I would really appreciate if you could have look.
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-01-2023 08:25 PM
what about pdf or other file?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2023 06:57 AM
Hi @Ankur Bawiskar Thanks for your quick response. PDF and Other files are also not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2023 07:20 AM
are you in global scope or custom scope?
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-02-2023 07:23 AM
Ankur, I'm working in Global scope.