Updated attachement (via curl) is corrupt [SOLVED]
Hi,
I have updated an attachment via curl and see the new file in Wrike. But it is corrupt and only has a few Bytes.
curl -g -X PUT -H 'Authorization: bearer ${wrike-api-token}' -H 'content-type: application/octet-stream' -H 'X-Requested-With: XMLHttpRequest' -H 'X-File-Name: ${pdf}' --data-binary 'new attachment content' 'https://www.wrike.com/api/v4/attachments/${wrike.attachment.id}'
Do you have an idea what's wrong? The curl command looks good to me. Also when using the '-v' parameter for verbose processing I do not see an error.
Thanks a lot
I could solve it with the support of the Wrike team.
I made a mistake and Romans reply has helped me to identify it. The problem was, that I have missed the "@" character in --data-binary. The effect was, that I did not upload the PDF file to Wrike, just a file which looks like a PDF and only contained the path of the PDF. Very stupid mistake, but finally I solved it.
Thanks a lot for posting the solution here Stefan Jung 🙂 We're always happy to help!
Lisa Community Team at Wrike Wrike Product Manager Become a Wrike expert with Wrike Discover
Lisa Wrike Team member Become a Wrike expert with Wrike Discover