Skip to content
Single small binary for both TUS server and client
Go Makefile
Branch: master
Clone or download
Jack Tang
Latest commit ecddcf3 Jul 25, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd FIX: wrong usage message Jul 24, 2019
.gitignore FIX: travis CI missing upx Jul 22, 2019
.release-it.json WIP Jul 21, 2019
.travis.yml UPT: enable GO111MODULE in travis Jul 21, 2019
go.mod UPT: add upx in build + improve listing page style Jul 21, 2019
go.sum UPT: add upx in build + improve listing page style Jul 21, 2019


build status

TUS Command line (tusc) is a small static binary for both server and client of tus resumable upload protocol.

Personally, I need tusc for uploading files in a CI process and a simple UI for downloading (like nginx autoindex). The chucked and resumable feature make it possible to bypass some payload size limitation imposed by proxy. Also, small size of binary make it convenient to be included in docker image.

Quick Start

Visit releases page and download the tusc binary.

$ curl -LO<version>/tusc_linux_amd64 -o tusc
$ chmod u+x tusc 

Start server

$ tusc server -h -p 8080

Create and upload a file

$ echo test > test.txt
$ tusc client text.txt     # not resumable
$ tusc client text.txt -r  # resumable

And then visit to file listing page


TUSC is a wrapper of tusd with and addition of a listing page. Features like S3, GCS, Prometheus, Hooks are removed from tusd, in favor of smaller binary size.


$ tusc s --help
tusc server

  tusc (server|s) [options]
  tusc (server|s) --help

  -u --url URL                    Url of HTTP server [default: http://localhost:1080]
  -b --bind ADDR                  Address to bind HTTP server to [default:]
  -p --port PORT                  Port to bind HTTP server to [default: 1080]
  -d --dir PATH                   Directory to store uploads in [default: ./data]
  --listing-endpoint PATH         Http path for flies listing [default: /]
  --files-endpoint PATH           Http path for files [default: /files/]
  --unix-sock PATH                If set will listen to a UNIX socket at this location instead of a TCP socket
  --max-size SIZE                 Maximum size of a single upload in bytes [default: 0]
  --store-size BYTE               Size of space allowed for storage [default: 0]
  --timeout TIMEOUT               Read timeout for connections in milliseconds.  A zero value means that reads will not timeout [default: 30*1000]
  --behind-proxy                  Respect X-Forwarded-* and similar headers which may be set by proxies [default: false]


TUSC is a command line implementation of this excellent library go-tusd.


$ tusc c --help
tusc client

  tusc (client|c) <url> <file> [options]
  tusc (client|c) --help

  -r --resumable            Save meta data in store for resumable uploads
  --store PATH              Path to save meta data for resume [default: ./.tusc]
  --chuck-size BYTE         Size of chucks of file [default: 2097152]
  --override-patch-method   Sending a POST request instead of PATCH [default: false] 
You can’t perform that action at this time.