Joachim Breitner's Homepage
My contribution to XKCD’s #949
Randall Munroe rightly put shame on all the geeks in the world when he pointed out that transferring files over the internet is still an unsolved problem.
I am a big fan of FileTea’s approach to transferring files, where they are streamed from browser to browser, without registration and without being stored on some central server, and where closing the browser tab reliably cleans up the transfer. But I wanted something that works from the command line, so I created a small tool called share-file that will use SSH port forwarding to serve the files from a local, embedded web server at a publicly available port, as shown in these screenshots:
It works without additional dependencies (but better with python-magic
installed) and requires a publicly available SSH server configured with GatewayPorts clientspecified
. For more details, see the README, and to try it out, simply fetch it with git clone git://git.nomeata.de/share-file.git
.
BTW, if someone implements a command line client for FileTea, I’ll happily dump share-file for it.
Comments
I think there is no technical difficulties to solve the 949 problem (however we can argue on the definition of "fixing" here).
We need to make people more aware of the fact that free software solutions exist.
Anyway, congrats for this simple solution, using ssh here is quite clever :)
[1] https://github.com/tOkeshu/fipes/
https://github.com/brechin/FileTeaSend
I had a similar idea for Emails, but never got around to actually implement it. I thought it would be a good idea to strip of binary attachments, put them on a webserver and replace them with a link to the file. To avoid potential security risks, the link to the file should be a shaXXX sum. Of course, if someone wanted real security, they should encrypt their files.
I think your solution is a step to that direction. It could probably be easily used as a postfix filter.
How do you generate your links (the AYLD.. part?)
I use
''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(8))
to generate the random string.
Several solutions for obsolete files come to my mind.
- Provide the sender with a deletion link
- Provide the receiver with a deletion link
- Provide both, sender & receiver, with a deletion link; do reference counting for multiple deletion links
- Automatically delete the file after X amount of time
- If the email is kept on the same server (e.g. by imap) keep a database of email/file references and delete the file when the email is deleted
Would be fun to implement something like this, if I had the time. :)
Have something to say? You can post a comment by sending an e-Mail to me at <mail@joachim-breitner.de>, and I will include it here.