I’m currently developing a custom Freshdesk app that opens a modal (client.interface.trigger('showModal', ...). The modal contains a form that posts data to our company issue tracker.
This is all working perfectly with the recommended approach: client.request.post....
The only thing that I can’t figure out is how to post a file to an endpoint through the Freshdesk request method. Is this supported or should I look for another solution?
The request body should be the content of the file you want to attach and the Content-Type header must be set to application/octet-stream (otherwise you’ll get a 406 Not Acceptable response). If the upload succeeds, you get a 201 response that contains a token for your uploaded file.
I guess if multipart/form-data is the only option, I’ll have to setup a proxy to process the file?
Replacing the png file in the body with an empty string does not result in an error. Is it possible that the freshdesk client can not handle files in the body?