stevestearns

cURL Image Syntax

Discussion created by stevestearns on Jul 25, 2018
Latest reply on Jul 26, 2018 by stevestearns

I am a total newbie with cURL, so I am sure I am missing something real simple in the syntax. Below is an example that I am trying to incorporate into FileMaker Pro Advanced 17:

 

curl -X POST -F image=@/car1.jpg 'https://api.openalpr.com/v2/recognize?recognize_vehicle=1&country=us&secret_key=sk_DEMODEMODEMODEMODEMODEMO'

 

Using their example, I created the following:

 

OpenALPR::CURLRequest = curl -X POST -F image=@/Macintosh\ HD/Users/stevestearns/Documents/Miscellaneous/Liberty\ Commons\ Condo/IMG_2785.JPG

 

OpenALPR::URL = https://api.openalpr.com/v2/recognize?recognize_vehicle=1&country=us&secret_key=sk_DEMODEMODEMODEMODEMODEMO

 

Please note that I did replaced the "secret_key=sk_DEMODEMODEMODEMODEMODEMO" in their example with my actual secret_key=sk_.

 

Script

 

Set Variable [ $$Results : Value: "" ]

 

Insert from URL [ Select ' With dialog: Off; $$Results ; OpenALPR::URL ; cURL options: OpenALPR::CURLRequest ]

 

Set Field [ OpenALPR::Results ; $$Results ]

 

OpenALPR::Results = {"error_code": 400, "error": "Missing file named \"image\" in request POST"}

 

I have played around with different paths, quotes, etc. but have not yet found the solution.

Outcomes