Corrupted files after upload by Form-Data HTTP

Ulf.Marxen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 10, 2024

Hello everybody,

I am struggling to upload images using the REST API v1 with the POST Create Attachment method.

We are using Azure Logic Apps to send an image as a form-data object. The upload works, and we receive a status code 200, with "mediaType": "image/jpeg" confirmed.

 

In Microsoft Logic Apps they send the posts in this format:

Create workflows that call external endpoints or other workflows - Azure Logic Apps | Microsoft Learn

The $content object is using base64toBinary function to convert the image. 

image.png

When I perform a GET Attachment request with the REST API v2, I get the response:

image.png

However, no image is displayed when I open the attachment in Confluence Cloud.

image.png

I also tried uploading the image via Postman as a form-data object. This image is displayed correctly.

Any idea whats wrong, or what I should try?

Thank you

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events