{"error":{"message":"Invalid file type: image/jpeg","detail":null},"status":"failure"}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2025 10:59 AM
Getting an error with Invalid File Type when using the Attachment API for Posting an attachment to an INC that is already created:
https://developer.servicenow.com/dev.do#!/reference/api/yokohama/rest/c_AttachmentAPI#attachment-POS...
I pass in "image/jpeg" as the content-type and receiving the error above. Not sure if I am doing something wrong with the content-type. Any help would be appreciated! thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-04-2025 12:39 PM
Hello @KadenV
Can you share screenshot if what you have passed in the REST API Explorer?
You can also checkout this video for Attachment API IN rest API EXplorer -
https://youtu.be/VqCxt1vSvIE?si=SMQBDTfc2jSE-Jz5
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2025 08:50 PM
Hello @KadenV
Please confirm if you checked my answer. Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for my efforts and also it can move from unsolved bucket to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-06-2025 09:19 PM
please share the complete details on how are you sending the image data?
Things to check
1) Are you sure you uploaded image only since you gave content type - image/jpeg
2) Are you sure file type image/jpeg is allowed on incident table?
share some screenshots of your REST API Explorer
Without this members can't help much.
It worked for me, check below
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2025 10:47 AM
The