Hi,
After few successful call conversions from word (docx) to html, and then I get an error.
Error while loading file ‘sourceFiles/Pre-Kindy Curriculum Guidelines_eed8cf16-3464-4d58-a61a-9c415468cb79.docx’ from storage. The specified file does not exist.
The error found in Azure application insights:
PUT /v4.0/words/Pre-Kindy%20Curriculum%20Guidelines_eed8cf16-3464-4d58-a61a-9c415468cb79.docx/saveAs
But actually the file is existed in blob container.
I use the nuget package "Aspose.Words-Cloud Version=“24.4.0”.
Here are part of code (c#).
// Retry logic
int retryCount = 0;
while (retryCount < 5) // Try a maximum of 3 attempts
{
// Since eventual consistency might be causing the file not to be available immediately after upload, consider increasing the delay before attempting the SaveAs operation.
await Task.Delay(2000); // Wait for 2 seconds before retryingvar isUploaded = await CheckBlobExistsAsync("asposecloud", blobName, _storageAccountConnectionString); if (!isUploaded) { _logger.LogWarning($"Retry {retryCount + 1}: The document '{sourceFileName}' is not uploaded yet. Retrying..."); retryCount++; continue; } result = await _wordsApi.SaveAs(request); if (result?.SaveResult?.DestDocument != null) { break; // Success, exit loop } _logger.LogWarning($"Retry {retryCount + 1}: Failed to save the document. Retrying..."); retryCount++;
}
Thank you.