Repository navigation
Show upload progress in stages: sent, ready to send, still to read - #59
Merged
Merged
Conversation
A 200 MB upload from a phone looked stuck: progress only moved when a whole 32 MiB part was stored, and with three parts sharing a slow uplink the bar sat at 0% for minutes, then jumped. Nothing said whether the browser was still encrypting, sending, retrying or paused. - Parts go out over XMLHttpRequest, which reports bytes as they are sent; fetch cannot report upload progress outside Chromium. Errors, retries and cancelling behave as before. - The upload reports encrypted, sent and stored bytes, plus retries. A retried part's sent bytes start over from zero. - The composer shows one bar in three parts that always add up to the bundle: sent, encrypted and ready to send, still to read. One line gives the amounts, rate and time left, or says what is wrong (retrying, waiting for the network, waiting for the server to confirm). Only those notices are announced. - The screen stays on during a file upload (Wake Lock API), so a phone that locks does not push the tab into the background and stall it. The network calls themselves are unchanged: three 32 MiB parts at once.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A 200 MB upload from a phone looked stuck. Progress only moved when a whole 32 MiB part was stored, and with three parts sharing a slow uplink the bar sat at 0% for minutes, then jumped. Nothing said whether the browser was still encrypting, sending, retrying or paused.
What changes
XMLHttpRequest, which reports bytes as they are sent.fetchcan't report upload progress outside Chromium, and no library helps: axios wraps XHR too, and tus/Uppy need a different server protocol. Errors, retries and cancelling behave as before.The network calls themselves are unchanged: three 32 MiB parts at once. Smaller parts would make a retry on a flaky connection cheaper, but that is a server change.
Checked
Not checked yet: a real phone over mobile data.