Skip to content

Instantly share code, notes, and snippets.

@yyolk
Last active January 28, 2024 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yyolk/257d0ddda11c32e3fd25e79e9efc2d79 to your computer and use it in GitHub Desktop.
Save yyolk/257d0ddda11c32e3fd25e79e9efc2d79 to your computer and use it in GitHub Desktop.
upload to transfer.sh with httpie
# curl is usually outdated and missing --upload-file option
# pipx install httpie
# pip install httpie
# apt install httpie
# transfer.sh follows HTTP semantics, where PUT is the appropriate file upload method
http PUT https://transfer.sh/destination.zip @source.zip
# or with redirection
http PUT https://transfer.sh/destination.zip < source.zip
# set Max-Downloads, and TTL with Max-Days
http PUT https://transfer.sh/destination.zip @source.zip Max-Downloads:1 Max-Days:5
# or with redirection
http PUT https://transfer.sh/destination.zip Max-Downloads:1 Max-Days:5 < source.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment