Hometus.io logo

Major release: tus-js-client v2.0.0

Published on by Marius Kleidl

tus is a protocol based on HTTP for resumable file uploads. Resumable here means that an interrupted upload can carry on without re-uploading already uploaded data again. An interruption may happen willingly, if the user wants to pause while switching to another workspace, or by accident in case of an network issue or server outage. When resumability is implemented with automatic retries (with this release now the default), the user does not need to notice there was an interruption. Since HTTP/1.1 such a resumability is available for file downloads already but not for file uploads as tus offers.

tus-js-client is the official client implementation for the tus protocol in JavaScript. Since it had been born five years ago, it has grown enormously in numbers of features and supported environments. While it was originally designed for web browsers, it can now also be used in:

However, over time this growth came at the cost of some technical debt which can hinder further development. In this release we cleaned up the code base, removed some odd API decisions from early stages and add long awaited features, such as Automatic Retries and Parallel Chunked Uploads. We are pleased to introduce you to the all new tus-js-client v2.0.0, which packs all this, and more.

New features

Besides cleaning up old technical debt, this release also introduces new functionality:

Breaking changes

The main behavior of tus-js-client and the vast majority of its API surface stay the same. However, the following breaking changes were necessary:

Try it

If you’d like to try it out, we have updated our demo to use tus-js-client v2.0 as well. The code for it can be found here. Do leave a comment there how it went!

Finally, we want to thank everyone who helped to make this release happen! If you also want to contribute, you can find our open source code at GitHub. If you don’t know where to start or have other questions, feel free to contact us!