-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix: Utilize user-defined onSuccess, onError, and onProgress callbacks in @uppy/tus #4674
Conversation
Seems like a good idea indeed. @Acconut, WDYT? |
It looks fine by me. But it's a question for you whether you want to allow users to receive these events using the tus-js-client callbacks and the Uppy events. That's two different approaches. Maybe you only want to support one approach. |
Thank you for taking the time to review my PR, especially since this is my first PR. Thank you for your feedback. I understand that Uppy already has a While it's true that both |
Technically this was already possible in both. From the docs:
This PR just makes passing |
| Package | Version | Package | Version | | ------------------ | ------- | ------------------ | ------- | | @uppy/companion | 4.9.0 | @uppy/locales | 3.3.1 | | @uppy/compressor | 1.0.3 | @uppy/tus | 3.3.0 | | @uppy/dashboard | 3.5.3 | uppy | 3.16.0 | | @uppy/image-editor | 2.2.0 | | | - @uppy/tus: Fix: Utilize user-defined onSuccess, onError, and onProgress callbacks in @uppy/tus (choi sung keun / #4674) - @uppy/dashboard: Make file-editor:cancel event fire when the Image Editor “cancel” button is pressed (Artur Paikin / #4684) - @uppy/companion: add missing credentialsURL for box (Mikael Finstad / #4681) - @uppy/companion: remove s3 endpoints if s3 disabled (Mikael Finstad / #4675) - meta: use latest Node.js version for tests (Antoine du Hamel / #4662) - meta: Improve Contributing.md (Evgenia Karunus / #4633) - @uppy/compressor: update file.meta.name after compression, becase format/extension might have changed (Artur Paikin / #4645) - @uppy/companion: Onedrive refresh tokens (Mikael Finstad / #4655) - @uppy/companion: catch "invalid initialization vector" instead of crashing (Mikael Finstad / #4661) - @uppy/image-editor: Improve image rotation (Evgenia Karunus / #4639) - @uppy/locales: Feature/updating i18n farsi (Parsa Arvaneh / #4638)
This PR fixes the issue where user-defined
onSuccess
,onError
, andonProgress
callbacks were being ignored in the Tus plugin. While these options were accepted during initialization, they were not being called in the respective events.This change ensures that if a user has provided any of these callbacks, they will be called in addition to the internal handlers.
Changes Made
onSuccess
,onError
, andonProgress
callbacks in the Tus plugin.