Animetrics Face Recognition

फ्रीमियम
द्वारा animetrics | अपडेट किया गया 19 days ago | Media
Health Check

N/A

सभी चर्चाओं पर वापस जाएं

Detect API on MashApe doesn't work when selecting file instead of url

Rapid account: Vollucris
vollucris
9 years ago

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

Rapid account: Animetrics
animetrics Commented 9 years ago

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.

Rapid account: Vollucris
vollucris Commented 9 years ago

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!

Rapid account: Animetrics
animetrics Commented 9 years ago

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.

Rapid account: Vollucris
vollucris Commented 9 years ago

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.

Rapid account: Animetrics
animetrics Commented 9 years ago

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:

    curl -H "X-Mashape-Key: YOUR_MASHAPE_KEY" -F "api_key=YOUR_API_KEY" -F "image=@/path/to/local/file" https://animetrics.p.mashape.com/detect

चर्चा में शामिल हों - नीचे टिप्पणी जोड़ें:

नई टिप्पणियाँ पोस्ट करने के लिए लॉग इन / साइनअप करें