* Move @uppy/utils/lib/prettyBytes -> @transloadit/prettier-bytes so we can more easily re-use it across projects
* Switch to MIT licensed @transloadit/prettier-bytes
* lockfile fun
* build: add dep for website/inject.js
Co-authored-by: Renée Kooi <renee@kooi.me>
* Fixing an error that would prevent the ProgressBar from hiding
Fixing an error that would prevent the ProgressBar from hiding, displaying a `0` in the HTML element .uppy-ProgressBar-inner whenever no files were being uploaded. This fix sets the .uppy-ProgressBar element a class, so the user can decide when to hide it (or what to do)
* Update index.js
improved comment
* removed custom class
* Fixing an error that would prevent the ProgressBar from hiding
`state.totalProgress` is not `100`. It's `0` instead
----------
To reproduce the error:
```
.use(ProgressBar, {
target: '._progress_bar_',
fixed: false,
hideAfterFinish: true
})
```
This will set a `div` inside the `_progress_bar_` element, and this element will be visible, showing `0` to the user.
The problem is that, currently, the bar only hides when `progress === 100`, but that is never true, as `progress` resets to `0` once the upload has been completed.
That means, it is __always__ visible, and only hidden for a brief period after an upload completes (when the `progress === 100`, briefly).
This fix allows the bar to be hidden also when the progress is `0` (after and before uploads)
* build: explicitly use `sh` for shell scripts
* build: fix css path check on windows
* build: use NODE_PATH instead of symlink for local package resolution in e2e tests
* build: actually with new lerna we do not need NODE_PATH
* build: sh → bash
* Add NetworkError error type and isNetworkError utility check
* Detect network errors in tus and xhr-upload
Co-Authored-By: Ifedapo .A. Olarewaju <ifedapoolarewaju@gmail.com>
* add NetworkError check to RequestClient in companion-client
* return false if !xhr 🙈
* move catch so that only errors from _checkMinNumberOfFiles are caught — errors from uploads are logged in `upload-error` already
//cc @goto-bus-stop
* Add NetworkError to MiniXHRUpload in aws-s3
//cc @goto-bus-stop
* Add tests
//cc @ifedapoolarewaju
* pass xhr to NetworkError
* add logging in catch of uppy.upload()
* start error message with “This looks like a network error”
* originalRequest --> request, return NetworkError right away
* check for NetworkError in `delete` as well
do we need it in preflight too, @ifedapoolarewaju?
* remove redundant error message re-declaration
* _showOrLogErrorAndThrow, but don’t showInformer
Co-authored-by: Ifedapo .A. Olarewaju <ifedapoolarewaju@gmail.com>