tus-shell-client
tus-shell-client copied to clipboard
:shell: A pure shell client for the tus resumable upload protocol
tus-shell-client 
tus is a protocol based on HTTP for resumable file uploads. Resumable means that an upload can be interrupted at any moment and can be resumed without re-uploading the previous data again. An interruption may happen willingly, if the user wants to pause, or by accident in case of a network issue or server outage.
tus-shell-client is a pure shell client implementation for the tus resumable upload protocol.
Install
wget -O /usr/local/bin/tus "https://github.com/fentas/tus-shell-client/blob/master/bin/tus?raw=true"
chmod +x /usr/local/bin/tus
Usage
Usage:
tus [options] file
Options:
-t URI [required] tusd endpoint.
-o List tusd OPTIONS.
-c MEGABYTES Read up to MEGABYTES bytes at a time.
> default: 1
-p N N parallel uploads.
> default: 1
-H HEADER Set additional header.
-r Reuploads given file from the beginning.
-h Shows usage.
➤ https://tus.io/protocols/resumable-upload.html
➤ https://github.com/fentas/tus-shell-client
Environment variables
You can set options as environment variables.
TUSD(Option:-t)TUS_HEADERSSeparate headers with,(Option:-H)
export TUS_HEADERS="Authorization: token,Other-Header: value"
equals: -H "Authorization: token" -H "Other-Header: value".
TUS_CHUNK_SIZEin MegaBytes (Option:-c)TUS_PARALLEL(Option:-p)
TODOS
- [ ] :rotating_light: test cases with https://github.com/sstephenson/bats ?
- [ ] :construction: kill child processes on SIGTERM
- [ ] :sparkles:
Upload-Defer-Length - [ ] :sparkles:
Upload-Expires - [ ] :sparkles:
Tus-Checksum-AlgorithmandUpload-Checksum - [ ] :sparkles:
DELETE - [ ] :wrench: Test
Upload-Concat.
Referrences
- https://tus.io/protocols/resumable-upload.html
- https://github.com/tus/tus.io/issues/96
- https://github.com/sstephenson/bats
License
This project is licensed under the MIT license, see LICENSE.