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

查看:822
本文介绍了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天全站免登陆