I'm trying to call this [web service](https://ocr.a9t9.com/api/Parse/Image) to recognize the text in a picture (OCR), but the call always fails with this error when using the example provided in jQuery 

> 
> System.InvalidOperationException: No file uploaded or URL provided ↵  
> 
>  bei OCRReaderMVCWeb.Controllers.OCRAPIController.Parse() in
>  d:\3bitbucket\1ocr.aaaa.com\OCRReaderMVCWeb\Controllers\OCRAPIController.cs:Zeile
>  243.
> 
> 
> 

Documentation: <https://ocr.a9t9.com/OCRAPI>
The API only accepts four parameters:

* apiKey: "helloworld" (free license)
* file: upload jpg image
* url: location of a remote image
* language: "eng" English by defualt

I've tried the API with curl commands and works fine as well as using the url commented in the code snippet below. I know you can't submit documents without an iframe with jQuery so the example provided is not correct.

```js
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
    <script>
        //Prepare form data
        var formData = new FormData();
        formData.append("file", "@5.jpg");
        //formData.append("url", "http://i.telegraph.co.uk/multimedia/archive/02007/Plate-1_2007614b.jpg"); //url of remote image
        formData.append("language", "eng");
        formData.append("apikey", "helloworld");

        //Send OCR Parsing request asynchronously
        jQuery.ajax({
            url: "https://ocr.a9t9.com/api/Parse/Image",
            data: formData,
            dataType: 'json',
            cache: false,
            contentType: false,
            processData: false,
            type: 'Post',
            success: function (ocrParsedResult) {
                //Get the parsed results, exit code and error message and details
                var parsedResults = ocrParsedResult["ParsedResults"];
                var ocrExitCode = ocrParsedResult["OCRExitCode"];
                var isErroredOnProcessing = ocrParsedResult["IsErroredOnProcessing"];
                var errorMessage = ocrParsedResult["ErrorMessage"];
                var errorDetails = ocrParsedResult["ErrorDetails"];

                //If we have got parsed results, then loop over the results to do something
                console.log("success? " );
                if (parsedResults != null) {

                    //Uncomment these lines if parsing multiple results
                    $.each(parsedResults, function (index, value) {
                        var exitCode = value["FileParseExitCode"];
                        var parsedText = value["ParsedText"];
                        var errorMessage = value["ParsedTextFileName"];
                        var errorDetails = value["ErrorDetails"];
                        console.log("text: " + parsedText);
                        var pageText = '';
                        switch (+exitCode) {
                            case 1:
                                pageText = parsedText;
                                break;
                            case 0:
                            case -10:
                            case -20:
                            case -30:
                            case -99:
                            default:
                                pageText += "Error: " + errorMessage;
                                break;
                        }

                    });
                }
            }
        });
    </script>
```