A simple local file sharing Python HTTP server for uploading and downloading files directly through a browser.
Runs in the current working directory, serving files and accepting uploads using a minimal web interface.
- Upload multiple files through a web form.
- Download files stored in a directory where script is ran by clicking links.
- Simple HTML interface for uploading and browsing files.
- Saves uploaded files to the same directory where the script is ran.
- Automatically shows the IP address the server is hosted on.
- No external dependencies required.
- Easy to run and customize.
- The server serves an HTML page with:
- A file upload form allowing multiple files to be selected.
- A list of uploaded files with clickable links for download.
- Files uploaded via POST requests are saved in the directory where script is ran.
- Files can be downloaded by clicking their links.
-
Clone or download the repository.
-
Navigate in your terminal to the directory where you want to upload and serve files, then Run the server:
python fileshare.py
- Make sure the server (running
fileshare.py) is started on a machine connected to the network. - On the client device (computer, phone, etc.) connected to the same network, open a browser.
- Enter the server’s IP address and port in the browser address bar, for example: 192.168.1.60:8000
- You will see the upload form and file list.
- Use the form to upload files, and click file links to download.
- Use your phone or one device as a Wi-Fi hotspot.
- Connect both the server machine(or could be same device hosting hotspot) and the client device to this hotspot network.
- Find the IP address and port of the server machine on the hotspot network is provided by the script.
- On the client device, open a browser and go to address provided by script
- Upload and download files as usual.
- Ensure firewalls or security software allow traffic on port.
- The server IP must be reachable from the client device.
- This method works well for quick local file sharing without internet.