Skip to content

⚡ Transfer files over wifi from your computer to your mobile device by scanning a QR code without leaving the terminal.

License

MIT, BSD-3-Clause licenses found

Licenses found

MIT
LICENSE
BSD-3-Clause
LICENSE.GO
Notifications You must be signed in to change notification settings

m-shahbaz-kharal/qr-filetransfer

 
 

qr-filetransfer

Transfer files over Wi-Fi from your computer to a mobile device by scanning a QR code without leaving the terminal.

screenshot

Install

Go 1.8 is required to run.

go get github.com/claudiodangelis/qr-filetransfer

Installation through a package manager

AUR (Arch Linux)

How does it work?

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.

Usage

Screenshot

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 is zipped by the program before being transferred

qr-filetransfer /path/to/directory

Specify the port to use for the web server

qr-filetransfer -port=8080 /path/to/my-file

Note: if the -port argument is passed, the value is stored and used for all future transfers. Use -force to reset the stored port value.

Arguments

  • -debug increases verbosity
  • -quiet ignores non critical output
  • -force ignores saved configuration
  • -zip zips the content before transferring it
  • -port sets port to bind the server to

Authors

qr-filetransfer started from an idea of Claudio d'Angelis (@daw985 on Twitter), the current maintainer, and it's developed by the community.

Join us!

Clones and Similar Projects

License

MIT. See LICENSE.

About

⚡ Transfer files over wifi from your computer to your mobile device by scanning a QR code without leaving the terminal.

Resources

License

MIT, BSD-3-Clause licenses found

Licenses found

MIT
LICENSE
BSD-3-Clause
LICENSE.GO

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%