Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fentas/tus-shell-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

20 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

Contributors 2

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /