Create attachment using Rest API of Confluence Cloud

Hello, I am creating a macro that uploads attachments to the current space of Confluence, and I am using Forge Custom UI. My question is: In the method for upload an attachment, how add the body parameters?

In the image are the method and the error.


Hi @MarceloMS , please follow this guide for uploading an attachment to a page:

1 Like

Hello Jatin, thanks for answering. I am following the same documentation that you indicate to me, but the error that marks me I do not understand. The tutorial is not very clear using Forge.

I don’t see a file parameter in your request, seems you are using title?
try “file”: ${file}

Also it says unexpected end of JSON input. You might have to remove an extra comma after formData: formData

1 Like

From what I can tell, this is now captured in: [FRGE-635] - Ecosystem Jira

Please watch, comment, and vote there.