curl: (26) 无法打开文件 [英] curl: (26) couldn't open file

查看:49
本文介绍了curl: (26) 无法打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试通过 curl 调用 box api 时出现此错误.

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

curl: (26) couldn't open file

找不到原因!我用正确的文件名调用这个 api-

Can't find why! I am calling this api with a correct file name-

curl https://upload.view-api.box.com/1/documents \
-H "Authorization: Token YOUR_API_TOKEN" \
-H "Content-type: multipart/form-data" \
-F file=@A_correct_file_name

我已经看到了所有三个已经提出的问题,但其中两个没有得到解答,一个是针对 Facebook 的.

I have seen all the three already asked questions but 2 of them are unanswered and one is specific to facebook.

cURL 错误 26 无法打开文件

致命错误:未捕获的 CurlException:26:无法'不打开文件"扔进去

获取致命错误未捕获的 CurlException:26:无法打开文件

推荐答案

抱歉各位!我的错.我没有在文件名中包含文件的扩展名.包含它后,它起作用了.我正在回答这个问题,以防将来有人犯同样的错误.

Sorry guys! My bad. I had not included extension of the file in the file name. After including it, it worked. I am answering this in case someone does the same mistake in future.

这篇关于curl: (26) 无法打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆