Hi there,
I'm facing a problem while I've tried to upload an attachment by my javascript code using fetch request.
I've inserted my file inside FormData (as said in documentation) and tried to send it by me following code:
const formData = new FormData();
formData.append('file', e.target.files[0])
const request = await fetch(`https://<instance>.zendesk.com/api/v2/tickets/side_conversations/attachments`,
{
method:"POST",
body:formData,
headers: {
'Authorization':'Basic encoded(email/token:token)',
},
}
);
const response = await request.json();
I'm able to upload files to "/api/v2/uploads.json", using fetch request and I don't catch a error.