Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter statement of upload-progress event is incorrect #212

Open
nerg4l opened this issue Mar 24, 2024 · 0 comments
Open

Parameter statement of upload-progress event is incorrect #212

nerg4l opened this issue Mar 24, 2024 · 0 comments

Comments

@nerg4l
Copy link
Contributor

nerg4l commented Mar 24, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant