We are trying to upload an attachement in the issue using curl command. The http resopnse code is 200 but content length is 0 and attachment is not uploading.
Command:
Hi @Bhavya K ,
I haven't tested this on the Server API, but for Cloud I use a similar API I would suggest adding the complete path of the attachment instead of just the name eg. (also note the use of Single quote for hardcoded text)
curl -D- -u admin:admin -X POST -k -H "X-Atlassian-Token: no-check" -F 'file=@'"./tmp/path/myfile.txt" http://myhost/rest/api/2/issue/TEST-123/attachments
Do let me know if this helps, also, please mark this thread as Accepted if this solves your query.
It looks like you're new here. Sign in or register to get started.