Repository navigation
tus-js-client v4.2.1+ Support
This release fixes compatibility with tus-js-client v4.2.1, which introduced
a breaking change in the onSuccess callback signature.
What's Changed
🐛 Fix: onSuccess callback argument forwarding (#62)
tus-js-client v4.2.1 changed the onSuccess signature from () => void to
(payload: OnSuccessPayload) => void.
The internal wrappers in useTus and useTusStore now forward all arguments
transparently via spread (...args), so both the OnSuccessPayload and the
upload instance are correctly passed to your callback regardless of the
tus-js-client version.
setUpload(file, {
onSuccess: (payload, upload) => {
console.log(upload.url);
},
});