-
-
Notifications
You must be signed in to change notification settings - Fork 205
How to track upload progress? #366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This would be nice, any word on this. |
Currently the http package is used for server communication and as far as I know, there is now way to track the uploading progress using this library. In order to track the upload of files, we might have to switch to dio. @phillwiggins Do you think we should do this? As the whole SDK uses the |
It does sound like a large change, however, I think you might be right. Except for websockets, I think the entire project depends on ParseHTTPClient which could be swapped out? It's definitely worth a try if you think that's the best option? |
I have created a branch that uses dio, currently it seems to work, but I will do further testing. |
When using it with a heavy app, web freezes sometimes. I think it is related to this. |
Hi! |
The problem is, that at least my test app freezes, using the branch above. |
I have created a branch that adds the option of getting the upload progress of a file. This is only tested on Android. Further testing is appreciated. file.upload(progressCallback: (int count, int total) => print("$count of $total")); I am still not sure if I will create a PR with this change, as I think, using two network libraries is not ideal. |
I tried to reproduce this freezes and where not able to do so. |
I have added the If we would change the whole SDK to use dio (PR this branch) we could even add send and receive progress indications to the |
Thanks u!! I'm going to try it on my app. |
@FNPCMDs I am considering to create a similar branch based on 1.0.28. |
Right now I don't have any issues with that branch. I'm using it to develop my android app and everything works like a charm. I think it could be a nice feature in 1.0.28 |
@phillwiggins |
Risky, but could work quite well. It's a very powerful networking library that could offer some great benefits. I doubt very much that people are using the http library directly, and as it's abstracted by the library we have wrote, there probably wouldn't be many breaking changes? |
Changing http to dio was possible with not to many changes. I suggest that I will create a branch based on 1.0.28, change everything to dio, implement features like progress callbacks and then test this in my current project. (Maybe @FNPCMDs can test it, too.) |
I have created a branch based on 1.0.28 that uses dio. |
Sorry!! I'm not getting notifications about this issue. I'm going to test your new branch in the following days. If I find any issues I will let you know. I will gladly help in this SDK. Greetings! |
@FNPCMDs |
I think it is solved now. |
Wow that was so fast |
Well... including a break it took 4 hours ;-) |
I am closing this now, as this feature was merged with #459. |
No description provided.
The text was updated successfully, but these errors were encountered: