Attachment sent through integration is being added in SN but as 0 byte.

Bindu Jayagond
Tera Contributor
Hello All,
 
We conducted an integration with an external website where users fill out a form. When a user submits the form, an incident is created in SN. During the form submission, the user attaches a file, which is then sent to ServiceNow and attached to the incident. However, when we download the file, it is attached as 0 bytes.
 
Could you please advise on how to fix this problem?
 
Any help will be appreciated.
 
Thank you.
4 REPLIES 4

SanjivMeher
Kilo Patron
Kilo Patron

I think the data sent to ServiceNow, when converted to attachment has an issue.

How are you attaching the file in servicenow?


Please mark this response as correct or helpful if it assisted you with your question.

Hello,

 

The integration has been done by using Scripted REST API. In the script, we accessed the attachment table and added the attachment to the created incident.

 

Thank you.

Ankur Bawiskar
Tera Patron
Tera Patron

@Bindu Jayagond 

please share your scripted rest api and the what all data is sent in the json request body

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Sandeep Rajput
Tera Patron
Tera Patron

@Bindu Jayagond Looks like the attachment record in sys_attachment table is created but the multi-part data in sys_attachment_doc table is not getting generated. Please check corresponding records in sys_attachemnt_doc table and see if you find related records in it.