Command used :
curl -v -S -U user:Password -X POST -H "X-Atlassian-Token: no-check" -F "file=@image2020-11.png" -F "comment=this is my file" "https://confluenceURL/rest/api/content/199999999/child/attachment"
Error message received :
{"statusCode":403,"data":{"authorized":false,"valid":true,"allowedInReadOnlyMode":true,"errors":[],"successful":false},"message":"User not permitted to create attachments for content: ContentId{id=199999999}","reason":"Forbidden"}* schannel: server closed the connection
I can upload the image when I login with the same ID in confluence UI.
Have you found any solution to this ? I have tried this and got the same response. Seems like attaching documents to comments is disabled by default.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.