Ask HN: How to easily transfer files between devices
Airdrop is nice, but is not available for the linux machine. I have been using scp between the mac and the linux.
And if I need to transfer something to my phone, I will have to scp to my mac first, then airdrop.
webrtc based anonymous services like
https://file.pizza/
https://www.sharedrop.io/
are not ideal either. mainly they expect people to type very long urls or share urls with a message app. But in many cases, I need to share files with random people, I don't know how to exchange the long urls.
I want to make something better to solve this problem (as a side project). I have been having the itch for doing it for long. But every time I consult my friends about this idea, they don't seem to feel the pain that much.
Is this worth my time solving? Or I just missed some already existed solutions?
43 comments
[ 3.3 ms ] story [ 83.2 ms ] thread(No affiliation to the author)
I mean, I wish something like this existed, but I just don’t think there’s enough real need
[1] http://www.windowsnetworking.com/j_helmig/w98pws.htm
- An RPC mechanism (not built yet)
- A bi-directional multiplexing stream protocol [1] (mostly there)
- A general purpose binary encoding mechanism [2] (I've gotten bogged down with this for the past few months, but I can finally see the light at the end of the tunnel!)
The idea is to get these lower layers finished so that I can build all of my data communications related projects on top of them. One of those is a general-purpose file access system that I can build actual products on top of, such as file managers, remote filesystems, streaming services, synchronization, etc. I'm rebuilding everything underneath because the existing protocols are too chatty and bloated, not modular enough, don't work with encryption, or have weird requirements (like NFS requiring kernel integration for example, or they're restricted to the local net, etc).
[1] https://github.com/kstenerud/streamux/blob/master/streamux-s...
[2] https://github.com/kstenerud/concise-encoding
* they're too chatty.
* They waste too much on overhead.
* their bidirectional support is poor.
* Their asynchronous support is poor.
* They can't multiplex across multiple connections.
with a couple of clicks you can also share the things via URL with someone else.
And it's easy to share out individual files or folders from dropbox so others can access them.
https://xkcd.com/949/ https://xkcd.com/927/
Aren't there scp/rsync clients for iPhone?
If you want to get extra fancy, you can use an alias in .bashrc to shorten the "python -m http.server" to something you prefer.
I use the Mac apps to transfer from iphone to Mac.
It's not perfect, but I still use it sometimes.
Let's assume that the service is called "Throwbox", and you have an account with username `you@foo.com`, and the person you want to send a file to has username `them@bar.com`:
- You have a folder on your computer called "Throwbox"
- Inside that folder you create a folder called "them@bar.com" (so /Throwbox/them@bar.com)
- You put a file inside that folder.
- They create a folder inside their Throwbox directory called "you@foo.com" (so /Throwbox/you@foo.com)
- The file that you put in the folder on your machine gets copied onto the folder they created on their machine.
That way you don't need any information from them other than their username, and you can't send files to people who don't want to receive them. If you don't want to get files from another person anymore, then just delete the directory with their email address. And sending files is 2 way; if you want to send them a file back, just put it in the same place.
*Except for the "unless they don't want to receive files from you" part.
If you just want something simple for personal use, I'd look into the iOS Shortcuts app. Shortcuts can send files that were shared to it via HTTP or SSH (as STDIN to a shell command), and it can store files on your phone. You could use QR codes to exchange URIs, IP addresses or file paths.
For example, to send from Linux to iOS:
For iOS -> Linux:Because in order to be simple, any solution requires the skilled time and attention of an engineer to create an abstraction layer over the fiddly details. And to update that as the device takes updates.
If you do it as a peer-to-peer tool, that effort is O(N^2). Adding Each new platform requires ensuring that it works with N other platforms you already support.
If you introduce some intermediary like a cloud server, then the problem is O(N). When you add a new platform, just make sure it works to talk between the server and that 1 type of client.
But why does the intermediary have to be a whole server? Why can’t it be a protocol or format? <% insert explanation from someone more knowledgeable about filesystems %>
Peer to peer solutions are more difficult to build because there are more problems to solve:
* Peers need to be in the same network (same Wifi, Internet, etc.). If they are not, a connection needs to be established in some way.
* Peers need to know how to reach each other. How can they exchange addresses?
* Network/OS needs to allow exchanging messages (NAT, firewalls, proxies, ...). If they can't, then what?
All of these are complicated and have lots of error cases.
Cloud-based solutions make some assumptions to simplify the problem space: peers have a working internet connection, they can use DNS to look up addresses, and can reach a centralized server, usually via HTTP. It's even better if they are browser based, then peers don't need to install a new client.
As Bluetooth and Airdrop show, things don't always need to be cloud based. But also, as Bluetooth shows, it's really difficult to make it work seamless.
https://f-droid.org/en/packages/com.MarcosDiez.shareviahttp/
It's open source and your data will be encrypted.
https://owlink.org/
The really cool thing is it's peer-to-peer - if you have multiple desktops running KDE Connect, they can all send files to each other!
Not great for sharing files with "random people" though.
Sometimes I use [woof](http://www.home.unix-ag.org/simon/woof.html) that starts simple web server and prints link to the file you can use to download it.
For sharing with random people, if you can’t send long URLs (through messages or even through a QR code), then you probably can’t ask them to install an app or visit a website I suppose.
[1]: https://airdroid.com