weblink: easy file sharing
Weblink sets up a small Web server on your computer to make some of your files available as downloadable web links.
First things first
Check that you have python installed, download weblink, and type:
chmod +x ./weblink
Basic usage
To share /home/pierre/lolcat.jpg, type:
./weblink /home/pierre/lolcat.jpg
The file is accessible to you through http://localhost:8888/. On the internet, the file is downloadable at http://n.n.n.n:8888/ where n.n.n.n is your computer IP address. The link is valid until weblink is stopped.
Important: If you have a firewall, you must open port 8888. If you have a NAT router, you must configure it to forward port 8888 to your computer.
Share several files
You can share several files by passing them on the command-line or by using wildcards:
./weblink lolcat1.jpg lolcat2.jpg xkcd*.png
Password protection
To protect access to your files, you may specify a pseudo-password with the --pass
option. For example, type:
./weblink --pass abcdef lolcat.jpg
and lolcat.jpg will be available at:
http://n.n.n.n:8888/abcdef/
If you can’t think of a password, use the --randompass
option instead.
./weblink --randompass lolcat.jpg
Port number
You can run weblink on a different port with the -p
option:
./weblink -p 7777 lolcat.jpg
Kudos to the python developers for making writing weblink so easy!