简体   繁体   English

如何处理DropNet的下载文件进度

[英]How to handle downloading file progress by DropNet

I'm using DropNet to download file from Dropbox, I see it use the RestClient for execute the reques. 我正在使用DropNet从Dropbox下载文件,我看到它使用RestClient执行请求。

My question: Is there anyway to get progress status during the Download? 我的问题:在下载过程中是否有进度状态? I mean, if I'm downloading a few Megabyte file size, how I'll know that the download is in progress?! 我的意思是,如果要下载几个兆字节的文件,我怎么知道下载正在进行中?

Shouldn't we have for example callback for inform the caller about status?, each package call this call bace with status like package number?, so client can wait or retry...? 例如,我们是否应该没有回调来通知呼叫者状态?,每个程序包都以类似程序包编号的状态调用此调用,以便客户端可以等待或重试...?

Thanks Joseph 谢谢约瑟夫

Sadly the answer to this is no. 遗憾的是,答案是否定的。 RestSharp doesn't support this so DropNet doesn't either. RestSharp不支持此功能,因此DropNet也不支持。

You could proabably take a look at DropNetRT which is based off HttpClient https://github.com/dkarzon/DropNetRT . 您可能会看看基于HttpClient https://github.com/dkarzon/DropNetRT的 DropNetRT。 It doesn't currently support progress out of the box but could be modified using something similar to this: https://stackoverflow.com/a/8492195/75946 它目前不支持开箱即用的进度,但可以使用类似于以下内容的方法进行修改: https : //stackoverflow.com/a/8492195/75946

If you do have a go at this let me know so I can either help you out or include your changes into the project. 如果您确实愿意,请告诉我,以便我帮助您或将您的更改纳入项目。 I've had a bit of feedback for this feature but haven't found a good way to do it yet. 我对此功能有一些反馈,但还没有找到实现此功能的好方法。

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

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