HACKER Q&A
📣 billconan

How to easily transfer files between devices


I own one linux and one mac computer, and also one iphone. I found transferring files between them is not convenient.

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?


  👤 SiDevesh Accepted Answer ✓
I use kdeconnect extensively and it's by far the best solution I have seen. Not only does it allow for sending files but you can even browse the storage on your phone from your computer wirelessly, plus it does notifications syncing, remote commands and a whole lot more. It's actually available now for linux as well as mac and windows and runs great.

👤 jjjbokma
Instead of `scp` you can use `rsync`. iOS13 supports SMB via the file manager, you can set up SMB on the Linux machine and access your files on both the Mac and the iPhone via SMB.

👤 appleiigs
Between Mac and Linux, I use "python -m http.server". Specifically, I go to the source folder, run the python simple HTTP server. Then in the destination computer or iPhone, I browse the source folder.

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.


👤 kstenerud
I'm working on this problem now. I'm still building the lower layers, which are:

- 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


👤 pure_simplicity
You could try onionshare [https://onionshare.org/] Or you could try magic wormhole [https://github.com/warner/magic-wormhole]

👤 andor
All of the cloud drives solve this issue.

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:

  - Linux machine serves file over HTTP, displays a QR code with the URL
  - You scan QR code and download the file
For iOS -> Linux:

  - Linux machine displays QR code with its IP address
  - On your phone, you share the file with a shortcut
  - The shortcut scans the QR code, then connects to the machine via SSH.
  It runs an application on your Linux machine (e.g. cat > /tmp/file-from-ios)
  and passes the file in as input.

👤 pbalau
I'm using the "stupid" method of emailing stuff to myself. Works for pictures I'm taking with my phone and I also don't have to spend too many neurons doing so.

👤 mcphage
Here's how I'd love this process to work:

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.


👤 Matthias247
Existing solutions that cover this are services like Onedrive, Dropbox & Co. Copy things into one folder one a device and it will show up on all other devices. Either directly downloaded, or easily be available for download.

with a couple of clicks you can also share the things via URL with someone else.


👤 auslegung
The usability difference between a platform-agnostic AirDrop, and Dropbox, just isn’t big enough imo. Most people are happy enough with Dropbox or Drive.

I mean, I wish something like this existed, but I just don’t think there’s enough real need


👤 weikju
AirDrop is supposedly based on the OWL protocol, and is possible to use under Linux. Never tested it myself..

https://owlink.org/


👤 emj
It's worth it! Even tough it's been worked upon forever; Dropbox. Napster, Emule, FTP, Kazaa, MIME, zmodem. I've never connected the dots between these two comics but they are published just some months a part. Basically this is a social problem not a technical one.

https://xkcd.com/949/ https://xkcd.com/927/


👤 wtmt
For sharing files between your own devices, AirDroid [1] would be the simplest one to use. It’s also accessible on web.airdroid.com so you can drop files on to the website and send to or receive from other devices.

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


👤 DerekRobot
Could you make something like the old Windows Personal Server [1], but dummy-proof? Make the app a DYNDNS client and let them register subdomains on your short domain (mybox.foo.bar/file.png). Essentially just a very simple server like XAMPP that users can drop their files into.

[1] http://www.windowsnetworking.com/j_helmig/w98pws.htm


👤 A1CY0N
Have a look at https://syncthing.net/

It's open source and your data will be encrypted.


👤 rambojazz
The core problem here is not what program to use for transferring files, but rather how one device can reach the other. With all the firewalls, proxies, NATs, and whatnot, it's quite difficult to establish a direct connection between two devices without using an intermediary server. If you can make the connection simple, such as in your LAN, files exchange becomes trivial.

👤 leokennis
Personally I use my Fastmail storage, which you can access via WebDAV.

I don’t know about Linux but I’m assuming it handles WebDAV as well.

In Finder and Windows Explorer you can natively add a WebDAV location and it shows as a (removable) drive.

On iOS you can connect to WebDAV natively from the Files app, or use third party apps like FileExplorer.

Very convenient for “normal files”, maybe not that good for very large files.


👤 sellingwebsite
I use Firefox Send for that https://send.firefox.com

👤 sigsergv
Resilio sync works like dropbox and exists for all platforms.

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.


👤 ajennings
I tried this as a side project: http://sendfiles.direct/

It's not perfect, but I still use it sometimes.


👤 Daedren
Pushbullet is still a good alternative that works everywhere. Plus it allows for sharing text and links as well.

Snapdrop is a nice option as well, plus you can save it as a PWA


👤 yjftsjthsd-h
> And if I need to transfer something to my phone, I will have to scp to my mac first, then airdrop.

Aren't there scp/rsync clients for iPhone?


👤 quickthrower2
I use OneDrive across windows and iOS. Not sure what the Mac story would be with that. For bigger files it’s the sneakernet (USB drive)!

👤 bitfhacker
I use an app named "Handshaker" between Android and Mac. Its works pretty well.

👤 throw7
I use syncthing, but I don't think there is an ios client.

👤 simon_acca
‘python3 -m http.server’ is useful in many occasions

👤 tjasper2000
usb drive