我正在創建一個 Xamarin 應用程式,其中包含將大型視頻上傳到 Azure Blob 存盤的功能。
下面是使用的代碼。
BlobClientOptions blobClientOptions = new BlobClientOptions();
blobClientOptions.Retry.NetworkTimeout = Timeout.InfiniteTimeSpan;
BlobClient blobClient = new BlobClient("ConnectionString", "ContainerName", "fileName", blobClientOptions);
//previewVideo is an array of bytes
MemoryStream memoryStream = new MemoryStream(previewVideo);
await blobClient.UploadAsync(memoryStream);
有時我會收到以下錯誤。
Retry failed after 6 tries. Retry settings can be adjusted in ClientOptions.Retry
(The operation was cancelled because it exceeded the configured timeout of 0:01:40.
Network timeout can be adjusted in ClientOptions.Retry.NetworkTimeout.)
如上面的代碼所示,我正在設定NetworkTimeout但它總是在 100 秒后超時。
uj5u.com熱心網友回復:
根據git hub 上的Azure SDK,這是一個已知問題,并在上??個月的最后一次包更新中解決。
我更新了包,現在超時屬性作業正常。因此問題就解決了。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/496188.html
上一篇:在PushModalAsync之后,PopModalAsync的XamarinForms路由問題->匹配的不明確路由(...)
