Skip to content

Parameter statement of upload-progress event is incorrect #212

@nerg4l

Description

@nerg4l

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.

uppy.io/docs/uppy-core.mdx

Lines 1061 to 1078 in 96f5c5c

#### `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);
});
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions