Uploading attachments via the API

Support for Traq 3.x
Post Reply
User avatar
Posts: 4
Joined: Mon Jun 20, 2016 7:54 am

Uploading attachments via the API

Post by harinder » Wed Jun 22, 2016 9:27 am

Hi Jack
Does the following look okay to upload images to existing items? I've looked at Firebug as I uploaded an attachment via the web interface and as far as I can tell, the parameters are fine. But I'm not clear on whether the API accepts base64 encoded attachments. Appreciate your help.
curl http://my.site/traq/site/tickets/47/update \
-d access_token=...
-d attachment=%base64 encoded string%

User avatar
Advanced Member
Posts: 668
Joined: Fri Mar 27, 2009 7:37 pm
Location: Australia

Re: Uploading attachments via the API

Post by Jack » Wed Jun 22, 2016 5:15 pm

Unfortunately the API doesn't accept base64 encoded attachments.
I usually use the Postman Chrome extension to play around with API's, however with curl you could try to pass data to the API with "-F" instead, see this StackOverflow answer.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests