Coder Social home page Coder Social logo

DocumentReaderApi.Process() Throws ApiException - Error while copying content to a stream about documentreader-web-csharp-client HOT 3 CLOSED

HARVS1789UK-VAIIE avatar HARVS1789UK-VAIIE commented on June 14, 2024
DocumentReaderApi.Process() Throws ApiException - Error while copying content to a stream

from documentreader-web-csharp-client.

Comments (3)

KirylKovaliov avatar KirylKovaliov commented on June 14, 2024

Would you mind sharing all the code you're running in Azure function and letting us know what is the version of nuget package you use ?

from documentreader-web-csharp-client.

GubinAlexander avatar GubinAlexander commented on June 14, 2024

Hello @HARVS1789UK-VAIIE
We were unable to reproduce your issue outside the Azure:

Code:

using Regula.DocumentReader.WebClient.Api;
using Regula.DocumentReader.WebClient.Model;
using Regula.DocumentReader.WebClient.Model.Ext;

// Prepare Regula Client & Request
string? regulaBaseUrl = "https://api.regulaforensics.com";
string? regulaLicenseBase46 = _config.GetValue<string>("REGULA_LICENCE_BASE64");
ProcessRequestImage image = new ProcessRequestImage(
    new ImageData("/9j/4AAQSkZJ...."),
    Light.WHITE
);
RecognitionParams recognitionParams = new RecognitionParams()
    .WithScenario(Scenario.FULL_PROCESS)
    .WithResultTypeOutput(new List<int> {
                    Result.STATUS,
                    Result.TEXT,
                    Result.IMAGES,
                    Result.DOCUMENT_TYPE
    });
RecognitionRequest recognitionRequest = new RecognitionRequest(recognitionParams, image);

DocumentReaderApi api = new DocumentReaderApi(regulaBaseUrl).WithLicense(regulaLicenseBase46);

RecognitionResponse response = api.Process(recognitionRequest);
Console.WriteLine(response.Json);
Console.WriteLine("Finish");

According to error message on your side i would suggest to double check your converting to b64 alg.
This particular line:
string blobBase64 = blobStream.ConvertToBase64();

from documentreader-web-csharp-client.

KirylKovaliov avatar KirylKovaliov commented on June 14, 2024

Closing issue due to inactivity

from documentreader-web-csharp-client.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.