I have two containers in Azure storage, in order to do translations
original and transcribed, they are containers, because I need to access it
I have a method, to upload my document
public async Task<Uri> UploadToAzureBlobStorage(string FilePath) {
ContainerClient = new BlobContainerClient(ConectionString, Constants.AZURE_CONTAINER_ORIGINAL_DOCUMENT);
var blob = ContainerClient.GetBlobClient(Path.GetFileName(FilePath));
await blob.UploadAsync(FilePath, true);
return new Uri($"https://transcribemedocs.blob.core.windows.net/original{Path.GetFileName(FilePath)}");
}
The document gets uploaded successfully (https://transcribemedocs.blob.core.windows.net/original/Articulo 6 (1).docx)
I have declared a method for translating the document
public static async Task TranslatorAsync(Uri sourceUrl, Uri TargetUrl, string language = "en") {
DocumentTranslationClient client = new(new Uri(Constants.ENDPOINT), new AzureKeyCredential(Constants.KEY));
var input = new DocumentTranslationInput(sourceUrl, TargetUrl, language);
DocumentTranslationOperation operation = await client.StartTranslationAsync(input);
await operation.WaitForCompletionAsync();
}
I got this error
Azure.RequestFailedException: 'Cannot access source document location with the current permissions.
Status: 200 (OK)
ErrorCode: InvalidRequest
But when I go o the URL, I got this error