curl: (26) couldn't open file

后端 未结 6 1769
盖世英雄少女心
盖世英雄少女心 2020-12-06 00:26

I am getting this error, when I am trying to call a box api through curl.

curl: (26) couldn\'t open file

Can\'t find why! I am calling thi

6条回答
  •  离开以前
    2020-12-06 00:40

    Luis Cruz is correct: quotes are required around the filename, but I needed to use the 'file' keyword, not 'fileUpload', as is it shown in the question.

    curl -X GET \
    -H 'Content-Type: multipart/form-data' \
    -F file=@"/path/to/file.ext" \ 
    'http://host:port/path/to/dir'
    

提交回复
热议问题