document ai read change fileURI to local file path

Herson Ian Moneda 60 Reputation points
2025-04-17T17:00:39.94+00:00

Hi,

I'm new to this document AI, I want to know if we change the fileURI path to a local file path.

fileURI requires an https link, is there a way or a code to use a local file path.

string modelId = "";

Uri fileUri = new Uri("");

Operation<AnalyzeResult> operation = await client.AnalyzeDocumentAsync(WaitUntil.Completed, modelId, fileUri);

AnalyzeResult result = operation.Value;

Any help is appreciated.

Thanks

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
2,045 questions
{count} votes

Accepted answer
  1. Prashanth Veeragoni 4,440 Reputation points Microsoft External Staff Moderator
    2025-04-17T18:32:29.12+00:00

    Hi Herson Ian Moneda,

    Awesome to hear that it worked in your console App! Now moving to a C#.NET Web Application with file upload (multiple files) — yep, you're spot on! You'll need to process each uploaded file from the FileUpload control (or IFormFile if you're using ASP.NET Core MVC).

    Make sure your form has enctype="multipart/form-data".

    Consider file type validation (.pdf, .jpg, .png, etc.) before processing.

    You might want to show the results on the same page or store them in a temporary collection.

    Hope this helps. Do let us know if you any further queries.


    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    Thank you!

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.