I am trying to upload an image using Jira rest api.rest/api/3/issue/attachments.I have an image in png format and i am trying to upload the image to jira.I am using Logic apps to post the Image.I came to know that only I can post the Image to jira API is to convert the Image to Binary and then Upload the binary image to jira ticket.I have tried this but everytime a empty image is getting upload to the jira.
Please find the details below:
Body : {
"$content-type": "multipart/form-data",
"$multipart": [
{
"body": "@{outputs('Convert_Base64_To_Binary1')}",
"headers": {
"Content-Disposition": "form-data; name=\"file\"; filename=\"image.png\"",
"Content-Type": "image/png"
}
}
]
}
Headers:
{
"Authorization": "Basic @{body('Jira_Prod_Token')?['value']}",
"X-Atlassian-Token": "no-check",
"Content-Type": "multipart/form-data"
}
base64ToBinary(outputs(‘Base64_Image_output’))----I have used this function to convert to Binary.
I am not sure where is the Issue.Kindly let me know what are the ways to upload an image to the jira ticket without converting into Binary or suggest other ways .