onUploadProgress will be 100% before uploading process finished
Problem
Describe the issue hey every body. in the first, sorry for my poor english language. i wrote some code for uploading some images and data together by formdata format in react-native. and i use node.js in backend side and every thing is ok. i can upload images. but problem has occurred when i want use `onUploadProgress`. then `loaded` parameter will be `100%` immediately but the upload process take some minutes after that. just in record when i use ajax in js code it's will be perfect so the problem is not from backend side. and it occurred just in react-native and the images select and crop by `react-native-image-crop-picker`. here is my code: Example Code [code block] Expected behavior, if applicable Environment - Axios Version 0.21.0 - Node.js Version v14.15.1 - OS: ubuntu 18.04 - Additional Library Versions React Native 0.63.0 Additional context/Screenshots
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: onUploadProgress will be 100% before uploading process finished
I see the same issue. The onUploadProgress will ramp up to 100 pretty quick on a large file, but watching the network tab the file is still sending for a long time after progress has said it was 100. Then finally the promise will return. This does not have anything to do with localhost. Just upload a large file to say S3 and you will see, the onUploadProgress calls will finish WAY before the a
Trust Score
6 verifications
- 1
I see the same issue. The onUploadProgress will ramp up to 100 pretty quick on
I see the same issue. The onUploadProgress will ramp up to 100 pretty quick on a large file, but watching the network tab the file is still sending for a long time after progress has said it was 100. Then finally the promise will return. This does not have anything to do with localhost. Just upload a large file to say S3 and you will see, the onUploadProgress calls will finish WAY before the actual promise, i.e. the data, has been transmitted.
Validation
Resolved in axios/axios GitHub issue #3469. Community reactions: 14 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep