hi,
I would like to be able to have our costumers attach an image to a costum form that creates tickets in freshdesk.
I haven't been able to find much information on the subject, but this is what i found: https://support.freshdesk.com/support/discussions/topics/17744
I'll compress and encode the image in my end, and that works great, but i'm having some trouble when making the json object and sending it to freshdesk. This is how i imagine it should look like (and what i've tested):
{
"helpdesk_ticket":{
"subject":"Product issue",
"description":"description",
"requester_name":"Name",
"email":"ab@aiaiai.dk",
"source":1,
"ticket_type":"Product Issues",
"custom_field":{
all my costum fields
},
"attachments":{
"type":"file",
"name":"product-and-reciept.jpg",
"content-type":"application/octet-stream",
"resource":"data:image/.jpg;base64,//BASE64//"
}
}
}
Everything works great without the "attachments" object.
//BASE64// is my base 64 string, which works fine on it's own.
This, however, gives me a "we're sorry something went wrong" error..
Does anyone know what i'm doing wrong?
Thanks in advance,
Andy