uppy/packages/@uppy/progress-bar
Mikael Finstad 24fd4158a9
Companion stream upload unknown size files (#5489)
* stream upload unknown size files

behind a new option streamingUploadSizeless
COMPANION_STREAMING_UPLOAD_SIZELESS
for tus

* allow for all upload protocols

seems to be working
closes #5305

* refactor

and fix bug where progress was not always emitted

* fix type

* fix progress throttling

only do it on total progress

* Improve progress in UI

- only show progress percent and total bytes for files that we know the size of. (but all files will still be included in number of files)
- use `null` as an unknown value for progress and ETA, allowing us to remove ETA from UI when unknown
- `percentage` make use of `undefined` when progress is not yet known - don't show percentage in UI when unknown
- add a new state field `progress` that's the same as `totalProgress` but can also be `null`

* fix build error

* format

* fix progress when upload complete

* use execa for companion load balancer

if not, then it leaves zombie companion instances running in the background when e2e stops
have to be manually killed before running e2e again

* update docs and tests for new state.progress

* revert progress/totalProgress

* improve doc

* remove option streamingUploadSizeless

we agreed that this can be considered not a breaking change

* change progress the to "of unknown"

* revert

* remove companion doc

* add e2e test
2024-12-07 10:30:00 +08:00
..
src Companion stream upload unknown size files (#5489) 2024-12-07 10:30:00 +08:00
.npmignore @uppy/progress-bar: refactor to TypeScript (#4921) 2024-02-28 17:30:46 +08:00
CHANGELOG.md Release: uppy@4.8.0 (#5541) 2024-12-05 11:07:06 +00:00
LICENSE Move ProgressBar plugin to @uppy/progress-bar 2018-06-14 20:06:19 -04:00
package.json Release: uppy@4.8.0 (#5541) 2024-12-05 11:07:06 +00:00
README.md Fix links (#5492) 2024-10-29 13:54:00 +01:00
tsconfig.build.json cleanup tsconfig (#5520) 2024-11-18 20:41:59 +08:00
tsconfig.json @uppy/progress-bar: refactor to TypeScript (#4921) 2024-02-28 17:30:46 +08:00

@uppy/progress-bar

Uppy logo: a smiling puppy above a pink upwards arrow

npm version CI status for Uppy tests CI status for Companion tests CI status for browser tests

ProgressBar is a minimalist plugin that shows the current upload progress in a thin bar element. Like the ones used by YouTube and GitHub when navigating between pages.

Uppy is being developed by the folks at Transloadit, a versatile file encoding service.

Example

import Uppy from '@uppy/core'
import ProgressBar from '@uppy/progress-bar'

const uppy = new Uppy()
uppy.use(ProgressBar, {
  // Options
})

Installation

$ npm install @uppy/progress-bar

Alternatively, you can also use this plugin in a pre-built bundle from Transloadits CDN: Smart CDN. In that case Uppy will attach itself to the global window.Uppy object. See the main Uppy documentation for instructions.

Documentation

Documentation for this plugin can be found on the Uppy website.

License

The MIT License.