Skip to content

🐚 A pure shell client for the tus resumable upload protocol

License

Notifications You must be signed in to change notification settings

fentas/tus-shell-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tus-shell-client Build Status

Tus logo

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

Tus usage

Environment variables

You can set options as environment variables.

  • TUSD (Option: -t)
  • TUS_HEADERS Separate headers with , (Option: -H)
export TUS_HEADERS="Authorization: token,Other-Header: value"

equals: -H "Authorization: token" -H "Other-Header: value".

  • TUS_CHUNK_SIZE in MegaBytes (Option: -c)
  • TUS_PARALLEL (Option: -p)

TODOS

  • 🚨 test cases with https://github.com/sstephenson/bats ?
  • 🚧 kill child processes on SIGTERM
  • Upload-Defer-Length
  • Upload-Expires
  • Tus-Checksum-Algorithm and Upload-Checksum
  • DELETE
  • 🔧 Test Upload-Concat.

Referrences

License

This project is licensed under the MIT license, see LICENSE.

About

🐚 A pure shell client for the tus resumable upload protocol

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages