Skip to content

v0.9.0

Latest

Choose a tag to compare

@kqito kqito released this 16 Apr 14:52
· 11 commits to main since this release
fe25b20

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

Full Changelog

v0.8.4...v0.9.0