-
Notifications
You must be signed in to change notification settings - Fork 4.1k
onProgress() not working correctly when add Stream object to RequestParams #380
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
Hello @VerachadW, the problem is in my opinion that size of blocks to be reported (chunk size) is greater than your file size. #118 is request to add the feature, so it's right to create new issue. |
@VerachadW Thanks for creating the new issue! I was facing the same problem and was discussing with Adam in #118 . I was about to open a separate issue. Thanks for doing that! |
try this it work, it's very simple to fix: public void onProgress (int bytesWritten, int totalSize) |
@hateum when l use your method l got this:01-06 13:Progress 6818 from 4096 (166%),l don't know why total size is 4096 but bytesWritten is bigger than it. |
Long inactivity |
I fixed this issue, should @smarek merge code in main version?
private List inputStreamParts = new ArrayList();
Use: params.put("file", stream, "photo.jpg", "image/jpeg", length); |
Guys what is the status of this ticket? As @VerachadW said, the progress is still not working correctly for streams, just for files. If it won't be fixed I cannot really give meaningful feedback for the user most of the time... |
When I upload a file by adding a Stream object instead of File object, the progress was jumped from 0 to 100% instantly.
PS. I found that this issue was reported in #118, but I think create as a new issue would be easier to track.
The text was updated successfully, but these errors were encountered: