cURL to Upload file into Box not Working as Expected
I tried this command to upload a file and got these error as per the details below:
curl https://upload.box.com/api/2.0/files/content \ -H "Authorization: Bearer My-App-Token” -X POST \ -F attributes='{"name":"test.rft", "parent":{"id":"0"}}' \ -F file=@/Users/Sandesh/Desktop/test.rft
Error:
No Content Length
No Content Length
Description: Could not process this request because
there was no Content-Length specified.
curl: (6) Could not resolve host: -H
curl: (3) [globbing] nested brace in column 115
curl: (6) Could not resolve host: Bearer
curl: (6) Could not resolve host: My-App-Token”
curl: (6) Could not resolve host: -F
curl: (3) [globbing] nested brace in column 41
curl: (6) Could not resolve host: -F
curl: (6) Could not resolve host: Users
I have removed the token from this message.
Is there something missing in this command?
Please sign in to leave a comment.
Comments
1 comment