Form Recognizer JS SDK blob storage containers not properly working due to configuration or something or other

Nathan Partieli 0 Reputation points
2023-08-10T17:50:39.8533333+00:00

how would I connect my form recognizer to the blob storage container in the aws portal so that I could use it in the js sdk, also how would I structure my SAS url? Please keep in mind that I want to use the JS SDK and as a result must configure blob and url access properly

https://{accountname}.blob.core.windows.net/{foldername}?sp={sp}

I followed the steps and for some reason, it is still not working and says I have an empty storage container despite the fact that I have a full storage container, how should i perform the container setup to make sure it work as I have followed the documentation dilligently and am still getting the same error? I have configured CORS, proper IAM permissions, am using what I assume is the proper URL, and setup blob storage. I have been struggling with this for days and am unsure of the fix.

Azure Blob Storage
Azure Blob Storage
An Azure service that stores unstructured data in the cloud as blobs.
2,576 questions
Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,507 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sumarigo-MSFT 44,916 Reputation points Microsoft Employee
    2023-08-17T04:57:30.8633333+00:00

    @Nathan Partieli Firstly, Apologies for the delay response!

    Can you please double-check that your SAS URL is correctly generated and includes the required permissions.

    • Ensure that your CORS settings are properly configured to allow requests from your application.
    • Verify your IAM permissions, making sure the service principal or account you're using has the necessary access.
    • Test your SAS URL directly in a web browser or a tool like cURL to ensure it's accessible.
    • Can you share the screenshot of the error message>
    • Try to generate the SAS URL through Storage explorer tool

    To use the JS SDK, you need to configure blob and URL access properly. Here are the steps to do that:

    Install the Azure Blob Storage SDK for JavaScript using npm:

    npm install @azure/storage-blob
    

    Import the SDK in your JavaScript file:

    const { BlobServiceClient } = require("@azure/storage-blob");
    

    Create a BlobServiceClient object using the SAS URL**1**:

    <span class=" active-doc-0" data-doc-items="0">const blobServiceClient = new BlobServiceClient("{SAS URL[1](#doc-pos=0)</span>}");
    

    Use the BlobServiceClient object to interact with the blob storage container.

    0 comments No comments