简体   繁体   English

使用Azure存储下载文件并使用简历下载

[英]Download file using Azure Storage with resume download

I want to resumable a file download from the Azure server. 我想从Azure服务器恢复文件下载。

I've tried with many third-party libraries. 我尝试过许多第三方库。 ie PRDownloader, Fetch but Azure file is restart download while network issue OR any. 即PRDownloader,Fetch但Azure文件重启下载网络问题或任何。

Referred c# code 推荐的c#代码

var blobRequestOptions = new Microsoft.WindowsAzure.Storage.Blob.BlobRequestOptions
            {
                RetryPolicy = new Microsoft.WindowsAzure.Storage.RetryPolicies.ExponentialRetry(TimeSpan.FromSeconds(5), 3),
                MaximumExecutionTime = TimeSpan.FromMinutes(60),
                ServerTimeout = TimeSpan.FromMinutes(60),
                StoreBlobContentMD5 = true
            };

But not getting how it'll work in android. 但是没有得到它在android中如何工作。 Can any one help to short it out. 任何人都可以帮忙缩短它。 Help will be appreciate. 帮助将是欣赏。

This is the BlobRequestOptions class, there is a same method setTimeoutIntervalInMs like the ServerTimeout property. 这是BlobRequestOptions类,与ServerTimeout属性有相同的方法setTimeoutIntervalInMs

And about the example about setting the BlobRequestOptions properties, you could refer to this github code: MaximumExecutionTimeTests.java , it sets the MaximumExecutionTime and TimeoutInterval. 关于设置BlobRequestOptions属性的示例,您可以参考此github代码: MaximumExecutionTimeTests.java ,它设置MaximumExecutionTime和TimeoutInterval。

So you could combine the example with setRetryPolicyFactory to achieve the same effect like the c# code you post. 因此,您可以将示例与setRetryPolicyFactory结合使用,以实现与您发布的c#代码相同的效果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM