Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Image 为什么Camfind API返回“图像不能为空”,尽管JPG附带了请求?_Image_Mashape_Cloudsight - Fatal编程技术网

Image 为什么Camfind API返回“图像不能为空”,尽管JPG附带了请求?

Image 为什么Camfind API返回“图像不能为空”,尽管JPG附带了请求?,image,mashape,cloudsight,Image,Mashape,Cloudsight,我刚刚订阅了Camfind API,正在尝试上传一张我在设备上拍摄的照片,使用他们的端点 此端点允许您上载要标识的图像以及其他属性。最低要求参数为image_request[locale]和image_request[image] 我的请求指定了3个参数: image_request[image] image_request[locale] image_request[language] 所有其他字段都是可选的,我将它们留空 为什么它一直认为我没有附加图像?以下是我收到的答复: HTTP/1.

我刚刚订阅了Camfind API,正在尝试上传一张我在设备上拍摄的照片,使用他们的端点

此端点允许您上载要标识的图像以及其他属性。最低要求参数为image_request[locale]和image_request[image]

我的请求指定了3个参数:

image_request[image]
image_request[locale]
image_request[language]
所有其他字段都是可选的,我将它们留空

为什么它一直认为我没有附加图像?以下是我收到的答复:

HTTP/1.1 400 Bad Request
Cache-Control: no-cache
Connection: keep-alive
Content-Length: 38
Content-Type: application/json; charset=utf-8
Date: Thu, 12 Feb 2015 17:35:35 GMT
Server: Mashape/5.0.6
X-Cloudsight-Requestrate: 0.20389738512077885
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Ratelimit-Image-Requests-Limit: 500
X-Ratelimit-Image-Requests-Remaining: 498
X-Request-Id: fc2848a2-b7bc-4f25-b4d7-f5b5fe05ff1c
X-Runtime: 0.018830
X-Ua-Compatible: chrome=1
X-Xss-Protection: 1; mode=block

{
   "error": {
   "image": [
      "can't be blank"
]
  }
}

很多人都遇到了同样的问题,ImageSearcher的普遍反应是Mashape已经做了一些升级,这影响了他们的web界面。建议使用Mashape记录一张票据。这些帖子是6个多月前发布的,现在还没有任何变化。

请使用这个。它正在工作

{远程图像\u url: http://upload.wikimedia.org/wikipedia/commons/2/22/Turkish_Van_Cat.jpg, 地点:US en,授权:CloudSight jre10cooppia-Y_vfff,//您的关键语言:US en}


你能把你最初的要求包括进去吗?最好使用curl,或者如果可能的话使用代码。这将允许社区帮助您调试此问题。我们看到的一个常见问题是,在使用image_request[image]参数与基于URL的参数时,图像不是多部分表单编码请求的一部分。你能发布你用来请求的代码吗?