I just signed up and wanted to test the functionality using the test environment here in Mashape and when I try to use the Detect test selecting a .jpg file to upload, I get this error:
{
“errors”: {
“url”: “url or image field required”
}
}
The image field IS set, why is it still giving an error?
When I tried with a url, it works fine but not with a file upload. Does the picture have to be in a specific format? What am I missing?
Thanks,
Cristi
Присоединяйтесь к обсуждению – добавьте комментарий ниже:
Glad that you were able to try it out. I issued a ticket to mashape to fix last week. Hopefully they will get to it soon. Thanks for catching it.
Yes, curl works from the command line and it does what it should just fine. I was just having trouble testing it here in the interface. Thanks for looking into that. I see it’s still not fixed. Maybe they get around to fix it soon.
Thanks!
Ok thanks, sorry for the trouble. Looks like an issue with their test endpoint for a binary form field. I will issue a ticket to mashape to fix. If you have curl available on your machine, please try the command in my previous post.
Wait, I haven’t gotten to use my code yet. I’m still using the test environment from Mashape. I go to the Detect API portion and I have the option to Choose a file for the detect which I understand it is required if you don’t have an url for an image. Fine, so I leave the url empty and Choose a .jpg file from my computer. When I click on TEST ENDPOINT I get the error I mentioned above.
Hi Cristi,
Can you post the code that you are using? Keep in mind that the image field requires the actual image data. Curl will read that in for you from a file using the @ syntax. So an example using curl would be: