Transfer.sh is an instant sharing tool for programmers
Posted: 23 Jun 2018, 17:52
Transfer.sh is an instant sharing tool for programmers
How to upload
Upload multiple files at once
Encrypt your files before the transfer
transfer.usFile sharing tools are a dime a dozen these days. There’s Dropbox, Google Drive, and iCloud. But what if you want to share something quickly and easily from the command line? That’s why programmer Remco Verhoef created Transfer.sh.
The service has basically a file dump. You send a file to transfer.sh via curl and it stays there for fourteen days until its automatically deleted. For example, I uploaded this picture by adding a bit of code to my .bashrc.
The system is one of those small, clever tools that just works. Verhoef created it because he needed to be able to upload files on the fly.
“I created this application when I needed to share log data from within a ssh shell with someone else,” he said. “So I created a web application where I can easily upload files using curl (which is available on almost every platform) just using the command line and modify the file on the fly, like encrypting the contents, applying grep etc. The application has been made open source because it could be usable for many other people and I’d encourage them to run their own server.”
How to upload
Code: Select all
# Uploading is easy using curl
$ curl --upload-file ./hello.txt https://transfer.sh/hello.txt
https://transfer.sh/66nb8/hello.txt
$ curl -H "Max-Downloads: 1" -H "Max-Days: 5" --upload-file ./hello.txt https://transfer.sh/hello.txt
https://transfer.sh/66nb8/hello.txt
# Download the file
$ curl https://transfer.sh/66nb8/hello.txt -o hello.txt
Code: Select all
$ curl -i -F filedata=@/tmp/hello.txt -F filedata=@/tmp/hello2.txt https://transfer.sh/
# Combining downloads as zip or tar archive
$ curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).tar.gz
$ curl https://transfer.sh/(15HKz/hello.txt,15HKz/hello.txt).zip
Code: Select all
# Encrypt files with password using gpg
$ cat /tmp/hello.txt|gpg -ac -o-|curl -X PUT --upload-file "-" https://transfer.sh/test.txt
# Download and decrypt
$ curl https://transfer.sh/1lDau/test.txt|gpg -o- > /tmp/hello.txt