Question

Post JIRA Attachment to API as multipart/form-data

  • 3 November 2022
  • 0 replies
  • 271 views

Userlevel 1

I am trying to send a file attachment from Jira to an internal API using Zapier webhooks. My trigger is set up as “New Issue In Jira Software Cloud”. My action is set as “POST in Webhooks By Zapier”. I set the Payload Type to “form”, but I don’t have any form data besides the file attachment to send. In the “File” field, I set the value as “1. Fields Attachment”. I think this is what I need, but have not found any supporting documentation.

The problem comes from the tooltip for the File field: “A file object to be attached to the request. The request will automatically be converted to multipart/form-data, with the above payload type defining the sub content-type for the data being passed.”

multipart/form-data is the content type that I need, but when I actually create a new issue and trigger the zap, my API responds with this error: “The app returned "expected a multipart form, got application/x-www-form-urlencoded".” So it appears that the tooltip is incorrect and the content type is actually set to application/x-www-form-urlencoded whether there’s a file attachment or not.

Am I missing something here? I’m exploring using code instead to handle this, but would prefer to use webhooks.

Thanks,

Jeff


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.