You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This has been reproduced in Firefox, Chrome, and Safari.
I think the issue is caused by this code, which directly interprets the ProgressEvent.loaded value as the currently uploaded byte count, which apparently is incorrect in this case.
Looking in the network inspector it seems like the loaded value corresponds to the size of the POST request body, which is larger than the file due to ~2.5kb of extra data:
Initial checklist
Link to runnable example
No response
Steps to reproduce
Expected behavior
getFile()
, if that's being updated less frequently)bytesUploaded
should never be larger thanbytesTotal
Actual behavior
progress
argument andfile.progress
being in incomplete states. (This is probably related to Outdated file state during upload-progress event due to setState implementation #4593)bytesUploaded
reliably exceedsbytesTotal
, with the effect being especially pronounced for small files.Here's an example for a 3.5kb file:
This has been reproduced in Firefox, Chrome, and Safari.
I think the issue is caused by this code, which directly interprets the ProgressEvent.loaded value as the currently uploaded byte count, which apparently is incorrect in this case.
Looking in the network inspector it seems like the
loaded
value corresponds to the size of the POST request body, which is larger than the file due to ~2.5kb of extra data:If we assume all the extra data comes before the file (pretty safe imo) the calculation could change to this:
That or it could be computed using the fraction:
The text was updated successfully, but these errors were encountered: