Hi Everyone,
I'm trying to use the confluence API to upload an attachment. The API works, however, the attachment goes to the attachments page. I would like the attachment to get attached to the page itself.
curl -v -S -u admin@example.com:api_token -X POST -H "X-Atlassian-Token: no-check" -F "file=@myfile.txt" -F "comment=this is my file" "https://your-domain.atlassian.net/wiki/rest/api/content/3604482/child/attachment" | python -mjson.tool
Dear @atalwar ,
what you observed is "by design". All attachments are stored as 'content' of one page. The overview is the 'tab' you describe.
When you like to make the attachment appear on the page, you need to reference it in the body of your page.
I recommend to get one page with attachments, to have an example how attachments are referenced. Then, after the attachment upload, you can update the page with the REST API to make the attachment visible.
So long
Thomas D
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.