(no title)
minhmeoke | 2 years ago
python -m http.server 8000
You first start one server on a desktop/laptop which has the software, and then any client (Android, iOS, PlayStation, Kindle, etc) with a web browser (no need to install any client software) can upload or download files from it.You can download prebuilt binaries for x86-64 Linux, Windows 7 or higher, or Mac OS 10.7 Lion or higher (sorry, no prebuilt binaries for Apple Silicon, but they could be added if there is sufficient demand) from https://github.com/akovacs/uploadserver/releases/ or compile from source using a nightly rust toolchain if you prefer.
Start the file server on a desktop machine:
chmod +x upload_server
./upload_server
Determine your machine's IP address using: # Linux
hostname -I
# Mac
ifconfig
# Windows
ipconfig
Navigate to the server's ip address port 8000 (indicated by the hostname -I command you ran earlier) in the web browser of your choice on any device (no need to download or install any client applications) and upload files using the web UI or directly via curl: curl -X POST --data-binary @file_to_upload.txt http://192.168.1.X:8000/uploaded_file.txt
Then download the file to another machine or mobile device either from the web GUI or via a commandline tool: curl http://192.168.1.X:8000/uploads/uploaded_file.txt --output downloaded_file.txt
If you don't have a local network, you can setup an adhoc hotspot on any Android 9+ (Settings > Network & internet > Hotspot & tethering https://support.google.com/android/answer/9059108) or iPhone (Settings > Personal Hotspot), then connect to it using any WiFi-enabled device.Compared to cloud services or `python -m http.server 8000`, this is extremely fast since the server is written in rust, it is fairly simple (compiled and stripped binary is typically less than 3MB), it sends everything over local LAN, it seems to handle large files (over 4GB) fairly well, and you only need to install the software on one machine.
No comments yet.