Welcome to the new Box Support website. Check out all the details here on what’s changed.

Error while using file upload API - Content-Length not specified

New post

Comments

1 comment

  • mwiller

    It looks like your curl command might have gotten malformed; usually the backslahes are used to do a multiline command but yours appears to be all on one line.  The curl error output seems to indicate that it didn't parse your command correctly:

     

    curl: (6) Could not resolve host:  -H

     

    I tried running the same sort of command as yours without the backslashes and it worked perfectly; could you try running this and see if it works for you?

     

    curl https://upload.box.com/api/2.0/files/content -H "Authorization: Bearer XXXXX" -X POST -F attributes='{"name":"test.jpg", "parent":{"id":"11446498"}}' -F file='@/Users/vprabhu/projects/test.jpg'
    0
    Comment actions Permalink

Please sign in to leave a comment.