I am trying to create CURL command to upload attachment with
curl -k -X POST -d @credentials.txt --data-urlencode firstname.lastname@example.org --data-binary attachment_1@[FileName] https://[URL]/rt/REST/1.0/ticket/[ticket-id]/comment
credencial.txt is passing user and password,
attachment_1 is variable @ exact file name same as in content.
Whatever I tried with file name, paths, adding Headers (here impossible), using posting --data instead of --data-binary etc. leads me to error:
“RT/4.4.4 400 Bad Request”
“# No attachment [FileName]”
Just to mention I have to use CURL and I am currently using same request for commenting and it works. That is Key Attachment used in content variable that makes it problematic.
Please share if any idea related to uploading attachments using this request.