22
33![ build status] ( https://travis-ci.com/jackhftang/tusc.svg?branch=master )
44
5- A single binary for both server and client of [ tus resumable upload protocol] ( https://tus.io )
5+ A single binary for both server and client of [ tus resumable upload protocol] ( https://tus.io ) .
6+ This is a trim-down version of [ tusd] ( https://github.com/tus/tusd ) in favor of smaller binary size (< 10 MB rather than > 30MB).
7+ S3, GCS, Prometheus, Hooks are not include. For client part, this a is command line implementation of [ go-tusd] ( https://github.com/eventials/go-tus ) .
68
7- ### Quick start on local
9+ ### Quick Start
810
911Start server
1012
@@ -16,13 +18,48 @@ Create and upload a file
1618
1719``` bash
1820$ echo test > test.txt
19- $ tusc client http://127.0.0.1:8080 text.txt
21+ $ tusc client http://127.0.0.1:8080/files/ text.txt # not resumable
22+ $ tusc client http://127.0.0.1:8080/files/ text.txt -r # resumable
2023```
2124
22- ## Server
25+ ## Server Options
2326
24- The implementation is a wrapper of [ tusd] ( https://github.com/tus/tusd )
2527
26- ## Client
28+ ``` bash
29+ $ tusc s --help
30+ tusc server
31+
32+ Usage:
33+ tusc (server| s) [options]
34+ tusc (server| s) --help
35+
36+ Options:
37+ -u --url URL Url of HTTP server [default: http://localhost:1080]
38+ -b --bind ADDR Address to bind HTTP server to [default: 0.0.0.0]
39+ -p --port PORT Port to bind HTTP server to [default: 1080]
40+ -d --dir PATH Directory to store uploads in [default: ./data]
41+ --listing-endpoint PATH Http path for flies listing [default: /]
42+ --files-endpoint PATH Http path for files [default: /files/]
43+ --unix-sock PATH If set will listen to a UNIX socket at this location instead of a TCP socket
44+ --max-size SIZE Maximum size of a single upload in bytes [default: 0]
45+ --store-size BYTE Size of space allowed for storage [default: 0]
46+ --timeout TIMEOUT Read timeout for connections in milliseconds. A zero value means that reads will not timeout [default: 30* 1000]
47+ --behind-proxy Respect X-Forwarded-* and similar headers which may be set by proxies [default: false]
48+ ` ` `
49+
50+ # # Client Options
2751
28- The implementation is a wrapper of [ go-tusd] ( https://github.com/eventials/go-tus )
52+ ` ` ` bash
53+ $ tusc c --help
54+ tusc client
55+
56+ Usage:
57+ tusc (client| c) < url> < file> [options]
58+ tusc (client| c) --help
59+
60+ Options:
61+ -r --resumable Save meta data in store for resumable uploads
62+ --store PATH Path to save meta data for resume [default: ./.tusc]
63+ --chuck-size BYTE Size of chucks of file [default: 2097152]
64+ --override-patch-method Sending a POST request instead of PATCH [default: false]
65+ ` ` `
0 commit comments