I am trying to upload some attachments to a confluence wiki page through the create attachment API.
I am using this curl as a test but keep getting an error after following all examples I can find on it:
curl -D- -u [username]:[token] -X POST -H "X-Atlassian-Token: nocheck" -F "file=MyFile.txt" -F "comment=This is my File" --header "Accept: application/json" https://[domain].atlassian.net/wiki/rest/api/content/[page_id]/child/attachment
The exact error I get back is: {"statusCode":500,"message":"java.lang.IllegalArgumentException: File name cannot be null or empty."}
Any other fields I might be missing in the request? I don't see anything else in the documentation on this.
Hi Neill,
Looks like this isuse has been resolved in the new versin of confluence cloud: https://jira.atlassian.com/browse/CONFCLOUD-31088
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.