Transfer files over Wi-Fi from your computer to a mobile device by scanning a QR code without leaving the terminal.
go get github.com/claudiodangelis/qr-filetransfer
qr-filetransfer binds a web server to the address of your Wi-Fi network interface on a random port and creates a handler for it. The default handler serves the content and exits the program when the transfer is complete.
The tool prints a QR code that encodes the text:
http://{address}:{port}/{random_path}
Most QR apps can detect URLs in decoded text and act accordingly (i.e. open the decoded URL with the default browser), so when the QR code is scanned the content will begin downloading by the mobile browser.
Note: Both the computer and device must be on the same Wi-Fi network.
On the first run, qr-filetransfer will ask to choose which network interface to use to transfer the files. Choose the network interface connected to your Wi-Fi:
$ qr-filetransfer /tmp/file
Choose the network interface to use (type the number):
[0] enp3s0
[1] wlp0s20u10
Note: On Linux it usually starts with wl.
The chosen network will be saved and no more setup is necessary, unless the -force argument is passed, or the .qr-filetransfer.json file the program stores in the home directory of the current user is deleted.
Transfer a single file
qr-filetransfer /path/to/file.txt
Zip the file, then transfer it
qr-filetransfer -zip /path/to/file.txt
Transfer a full directory. Note: the directory gets zipped before being transferred
qr-filetransfer /path/to/directory
-debugincreases verbosity-quietignores non critical output-forceignores saved configuration-zipzips the content before transferring it
qr-filetransfer started from an idea of Claudio d'Angelis (@daw985 on Twitter), the current maintainer, and it's developed by the community.
- quick-transfer - Node.js clone of this project
- qr-transfer-node - Another Node.js clone of this project
- qr-filetransfer - Another Node.js clone of this project
- share-file-qr - Python re-implementation of this project
- QRDELIVER - Node.js project similar to this
- qrfile - Transfer files by scanning a QR code
- instant-file-transfer (Uncredited) - Node.js project similar to this
- share-files (Uncredited) - Yet another Node.js clone of this project
- qr-filetransfer (Uncredited) - Python clone of this project
MIT. See LICENSE.

