The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Upload file through external service

ryan
Contributor
May 6, 2024

Hi, 

I want to use an external service to be able to upload a file to a specific field in a confiforms form that I have. Afaik Confiforms REST API Version 0 has an endpoint to do this but not through an external service as it is not capable of authorization. While Version 1 on the other hand does not support an endpoint to upload a file. What would my best route be in this case to achieve this?

Any help would be much appreciated. Thanks

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Andrii Maliuta
Contributor
May 7, 2024

Hello @ryan ,

As you specified the Server/Data Center version of Confluence, you should use the https://docs.atlassian.com/ConfluenceServer/rest/8.9.0/#api/content/{id}/child/attachment-createAttachments REST API (for your Confluence version).

E.g.:

curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" -F "comment=This is my File" http://myhost/rest/api/content/123/child/attachment

So you add the child item to the necessary page as an attachment.

ryan
Contributor
May 7, 2024

Hi, if it was not clear enough before, I was referring to APIs for conffiforms to be able to upload to a file to a confiform field

DEPLOYMENT TYPE
SERVER
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events