CrossGeeks / FileUploaderPlugin

Simple cross platform plugin to upload files.
MIT License
68 stars 27 forks source link

How to "Cancel the Uploading File" #18

Open Anmt-InfoCorp opened 6 years ago

Anmt-InfoCorp commented 6 years ago

Hi friends, First of all, I would like to send my sincere thanks to you. "Thank about your plugin. It 's very helpful for me". I used your plugin and it works well when the internet is strong. I got this problem when the internet is very weak (2G or sometime the internet is not good), the uploading is very slow. And my solution add a cancel button to "Cancel the Uploading File" but I don't know how to do it. So could you please give me your idea? Thank so much. :)

Bug Information

Cancellation Upload File

Version Number of Plugin: 1.4.0 Device Tested On: LG, Huawei Version of VS: 2017 Version of Xamarin: 3.1.0.697729

ydniw commented 6 years ago

The same issue I opened https://github.com/CrossGeeks/FileUploaderPlugin/issues/16, I have made a test on cancelling, not stable yet, still working on the quirks. It worked, however, if cancelling large file of 100Mb> there's quite a delay on cancelling. Cos the plugin uses OKHttp sink buffer running async and parallel on uploading chunks of file, cancelling each sink buffer write requires lots of time.

I will try to fork it, but got to do some errand (read: deadlines) first. :)

Anmt-InfoCorp commented 6 years ago

Thank for your info, @ydniw!!! 👍 Please give me more info when you finish it :)

kkarakk commented 5 years ago

@ydniw any progress on the cancellation fork?