Exchange files over LAN

(1 comment)

A very neat trick to share files over a LAN.

Make files available

In this scenario, computer B wants to make available files for A to download. A is the client, B is the server.

B exposes files to A

A LAN Local Area Network is what you typically have at home.

It's very simple to expose the files available in a folder:

python -m http.server 8888

Using the python interpreter installed on the machine and available in the path this will launch an HTTP server listening on port 8888.

After this point you may visit using a web browser http://localhost:8888 to see the files in the folder you launched the command from.

It's possible to download files from one computer to the other.

Upload files to a computer

Using a similar logic it's possible to send files over HTTP to another computer.

Upload files

git clone
cd python-simple-upload pip install -r requirements.txt python

This will run a webserver hosting a page that you can visit to upload files from a device connected on the same network.

The computer that could previously only download files is now capable of uploading files as well.

Currently unrated


Hildegarde 4 months, 4 weeks ago

Why is it I always really feel like you do?

Link | Reply
Currently unrated

New Comment


required (not published)