I'm trying to upload files to the Kayako REST API, as detailed here:
https://developer.kayako.com/api/v1/reference/file_upload/#single-step-uploading-2
Curl Options Used:
-X POST -H "X-CSRF-Token: <<my_token_here>>" -H "Content-Type: application/octet-stream" -H "X-Session-ID: <<my_session_id_here>>" -D $header_dump -d @$upload -b @$cookie -c @$cookie_jar
Where $upload is a variable set to the file to be uploaded (using set variable step)
CURL operation seems to run fine, but in the results, there's no 'content' listed, and indeed, the files which are displayed in Kayako are invalid (they have no content):
{
"status": 201,
"data": {
"id": 491780,
"name": "image.png",
"size": 902023,
"content_type": "application/octet-stream",
"content_url": "https://stickershop.kayako.com/api/v1/files/491780/content",
"created_at": "2020-04-23T18:54:29+00:00",
"expiry_at": "2020-04-24T06:54:29+00:00",
"resource_type": "file",
"resource_url": "https://stickershop.kayako.com/api/v1/files/491780"
},
"resource": "file"
}
Any ideas? Am I declaring the variable to be sent wrongly?