tus-server provides an implementation of the TUS protocol for resumable uploads built on cloudflare workers and R2.
You'll need Bun.sh. (The code is in TS, it remove the need to transpile, You can use Nodejs with --experimental-strip-types and npm)
To install dependencies,
bun install
In order to deploy to cloudflare or use non-local dev mode, use the wrangler
utility. Follow those instructions to authenticate with your cloudflare account.
The server work without authentification, but a empty middleware is provided to help you set it up.
To run a dev server you can interact with over localhost with local wrangler
bun run start:server
Open another shell and run:
bun run start:demo
Change the auth system, to implement your own current one works with a shared secret, that is used in tus-server and tus-resumable-upload-js
- Create an R2 bucket and update the binding in
wrangler.toml
- Change the auth system to your needs
- Deploy with wrangler
bunx wrangler deploy -e <staging|production>
Copyright 2024 Capgo, Digital shift OU
Licensed under the AGPLv3
This is a hard fork of https://github.com/signalapp/tus-server/blob/main/README.md
Rewrited to work in the Capgo (live update for CapacitorJS apps) tech stack, and in frontend