I have checked the various threads but still can't get this resolved. if anyone has any pointers.
I am creating a ticket via API and uploading multiple attachments.
Only the second attachment is uploaded. if I remove the second attachment , then the first one is shown which means the path and files are correct.
anyone can see whats wrong with the json would be appreciated.
$data_string='{
"alert":"false",
"autorespond":"false",
"source":"API",
"name":"XXXXXX",
"email":"XXXXXXXXXXX",
"phone":"XXXXXXX",
"subject":"XXXXXXXX",
"message":"message",
"topicId":"20",
"attachments":[
{"159_AppCopy.csv":"data:text/plain;charset=utf-8,test document"},
{"159_Applicat.csv":"data:text/plain;charset=utf-8,test document"}
]
}';

  • For anyone interested. I have found that if your content is the same within 2 seperate files in the same api request then only one document will be uploaded. in a way it makes sense to save space but it shouldnt be the appliactions responsibility to do that.

For anyone interested. I have found that if your content is the same within 2 seperate files in the same api request then only one document will be uploaded. in a way it makes sense to save space but it shouldnt be the appliactions responsibility to do that.

Write a Reply...