The example says to "Upload the data to the root of an Azure Blob Storage account." It seems like we have to create a container within the blob first, before we can upload files. With that, the api call fails with "Unable to list blobs on the Azure Blob storage account." Is there another option of generating the correct SAS URL?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
Thanks for the feedback! We are currently investigating and will update you shortly.
hello,
I was able to resolve this. You put the name of the container in the source blob SAS URL. Example - "yourblobname.blob.core.windows.net/<name_of_your_container>/rest of the sas url"
@iamsop Hi, thank you for sharing this. How do you think we can make the document clearer?
@YutongTie-MSFT, I walked into the same issue as iamsop. I think the text:
"Replace SAS URL with an Azure Blob storage container shared access signature (SAS) URL of the location of the training data."
Would be more clear if you add a line like
"Retrieve your SAS-URL by clicking 'Shared Access Signature' under settings menu in the storage account and 'Generate SAS and connection string' . This will show the Blob service SAS URL. Adjust this url by adding the containername After .net/ and before ?sv= in the url, eg:
@iamsop Thank you for your advice, I will update the document to make it more clear.
We will now proceed to close this thread. If there are further questions regarding this matter, please respond here and @YutongTie-MSFT and we will gladly continue the discussion.
(I'm going to replace my why-is-this-(still-)not-working comments with some notes that might help other people in the future)
(I'm going to replace my why-is-this-(still-)not-working comments with some notes that might help other people in the future)
(I'm going to replace my why-is-this-(still-)not-working comments with some notes that might help other people in the future)
Hints for newbs like me (taken from my previous comments in this thread which I'm going to hide for clarity):
curl -X POST "{endpoint}/formrecognizer/v1.0-preview/custom/train" -H "Content-Type: application/json" -H "Ocp-Apim-Subscription-Key: {subscription key}" --data-ascii "{'source': '{SAS url}'}"
_(Note: My personal preference with the command above is to use single quotes within the "data-ascii" value rather than double quotes because then you don't need to escape them, making the command easier to read and to write)_
Most helpful comment
@YutongTie-MSFT, I walked into the same issue as iamsop. I think the text:
"Replace SAS URL with an Azure Blob storage container shared access signature (SAS) URL of the location of the training data.".blob.core.windows.net//?sv=…. This is the SAS-URL to be used.
Would be more clear if you add a line like
"Retrieve your SAS-URL by clicking 'Shared Access Signature' under settings menu in the storage account and 'Generate SAS and connection string' . This will show the Blob service SAS URL. Adjust this url by adding the containername After .net/ and before ?sv= in the url, eg: