Hi,
I recently run in to an issue after subscribing to the upload-progress event. I did not understand why percentage is undefined while it should be the same.
The documentation of upload-progress states that the progress parameter is "The same object as in file.progress".
But that's not true. The progress value only contains a fraction of that object. The code example shows the correct structure.
|
#### `upload-progress` |
|
|
|
Fired each time an individual file upload progress is available: |
|
|
|
**Parameters** |
|
|
|
- `file` - The [Uppy file](#working-with-uppy-files) that has progressed. |
|
- `progress` - The same object as in `file.progress`. |
|
|
|
**Example** |
|
|
|
```js |
|
uppy.on('upload-progress', (file, progress) => { |
|
// file: { id, name, type, ... } |
|
// progress: { uploader, bytesUploaded, bytesTotal } |
|
console.log(file.id, progress.bytesUploaded, progress.bytesTotal); |
|
}); |
|
``` |
Hi,
I recently run in to an issue after subscribing to the
upload-progressevent. I did not understand whypercentageis undefined while it should be the same.The documentation of upload-progress states that the
progressparameter is "The same object as infile.progress".But that's not true. The progress value only contains a fraction of that object. The code example shows the correct structure.
uppy.io/docs/uppy-core.mdx
Lines 1061 to 1078 in 96f5c5c