Hi All,
I am trying to use cURL command to upload a simple test file in Box and find out it is working fine. But, I am facing the following issue.
This is the command that i tried on Terminal on MacBook.
curl https://upload.box.com/api/2.0/files/content \
-H "Authorization: Bearer GdeRrUh3nm8VJCUzd3LEIGyyLWiyR2op" -X POST \
-F attributes='{"name":"test.txt", "parent":{"id":"0"}}' \
-F file=@test.txt
Nothing happened. Do I need to give full path for file?
If give it like below file full path like below,
curl https://upload.box.com/api/2.0/files/content \
-H "Authorization: Bearer GdeRrUh3nm8VJCUzd3LEIGyyLWiyR2op" -X POST \
-F attributes='{"name":"test.txt", "parent":{"id":"0"}}' \
-F file=@/Users/myuser/test.txt
then i get error "curl: (26) couldn't open file "/Users/myuser/test.txt" in Terminal
Any help please?
