Hi Team,
I'm trying to upload a file to a confluence using the following curl.
script {
response = sh(script: "curl -u 'xxxxx@xxxxxx:xxxxxxxxxx' -X POST -H 'X-Atlassian-Token: no-check' -F 'file=@${workspace}/1.txt' https://xxxxx.xxxxxx/wiki/rest/api/content/xxxxxx/child/attachment", returnStdout: true)
echo '=========================Response===================' + response
}
The file is placed in the Downloads directory on my laptop. I have changed the permission to 777, so accessing it shouldn't be a problem. However, the curl request seems to fail.
curl: (26) read function returned funny value
ERROR: script returned exit code 26