- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2017 12:49 AM
Hi ,
We are performing a third-party integration using REST.
I am using POSTMAN and created a request to send attachments in binary format. Content field contains the binary coding of the file I am trying to attach.Below is the screenshot of POSTMAN request
The file gets attached to the incident, but it is not converted back to the image ,instead the file shows the Binary Encoding. Find the below Screenshot:
Can anyone suggest where the request is going wong.
Also, need to know how attachments in Binary format, sent to ServiceNow is Handled?
Any suggestions will be deeply appreciated.
Thanks,
Solved! Go to Solution.
- Labels:
-
Integrations
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2017 11:33 PM
Hi khozema,
I found a small error in postman request, you need not to give binary content manually just select the binary option and upload the file, it will be automatically converted into binary and do not forget to give Content Type.. it is not mandatory but is a good practice.
screenshot
Thanks
Neeraj sharma
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2017 02:18 AM
Hi Khozema,
Can you add Content-type as image/jpeg in the header and try it once.
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2017 04:02 AM
Hi Ankur,
It isn't working!
Are there any articles or links which can guide on how the attachments are handled through REST in ServiceNow, like how to decode the attachments and other things.
If you can please share some links and docs ,it will be helpful.
Thanks ,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2017 11:33 PM
Hi khozema,
I found a small error in postman request, you need not to give binary content manually just select the binary option and upload the file, it will be automatically converted into binary and do not forget to give Content Type.. it is not mandatory but is a good practice.
screenshot
Thanks
Neeraj sharma
Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2017 11:39 PM
Hi neeraj,
I tested it with the changes you suggested and it works fine
Thanks,
