Ajax Call from an HTML page does not works

I am calling these urls using POSTMAN and works just fine. But in jQuery AJAX I could not figure out the code make those call.

$("form[name='uploader']").submit(function(e) {
    var formData = new FormData($(this)[0]);
        type: 'POST',
        url: '//',

        beforeSend: function(xhr,settings) { 
             //i am using application id and password here
            xhr.setRequestHeader("Authorization", "Basic " + btoa("username:password"));
            return true;
        crossDomain: true,
        data: formData,
        processData: false,
        success: function(responseData, textStatus, jqXHR) {
        error: function (responseData, textStatus, errorThrown) {
            alert('POST failed.');

These calls dont work at all. Please check

Thanks in Advance!




  • Avatar
    Oksana Serdyuk

    Please see the following posts concerning using ABBYY Cloud OCR SDK in AJAX:

    And pay your attention to the fact that our Cloud OCR SDK service cannot work with data encoded in base64, it is necessary to pass binary data as is.

    If the issue is still actual, kindly send to the logs from the Fiddler debugger (you can download it from or any of its analogue. The logs should include the headers, request content and the answer. Then We will show them to our developers for clarification of the issue.

  • Avatar

    You are showing Javascript with nodejs. I have not got my answer properly. If this can be done with AJAX, jQuery not nodejs? If yes what is the issue in my code?

  • Avatar
    Oksana Serdyuk

    We have not got a ready sample code or instructions for using ABBYY Cloud OCR SDK in jQuery AJAX.

    To debug your code we recommend to use any HTTP debugger (for example, Fiddler). If you send the logs to, we will be able to show them the developers for investigation the issue.


Please sign in to leave a comment.