*** Python3: Simple Python HTTP Server ***
Update 2023-05-18 see second post for GUI applications.
This python3 SimpleHTTP server with upload "uploadserver" supports uploading multiple files https://pypi.org/project/uploadserver/0.3.0/#files
Attached a bit modified version (to make it standalone script) and named it "uploadserver.py":
(edit: my intention for the modification is to make it "portable", works too with uploadserver-0.3.0.tar.gz (from above link) extracted in PYTHONPATH and run as module, but less convenient IMO)
Remove fake .gz, make executable:
chmod +x uploadserver.py
and run for example:
Code: Select all
cd /mnt/home # change to what's preferred
/path/to/uploadserver.py 8000 # change /path/to and instead of 8000 change portnumber to e.g. 80
To upload with a browser it works a bit different than previous SimpleHTTP with upload, type /upload after the server address and you get at the "Upload page".
For example http://192.168.1.53:8000/upload
Another advantage of this is that uploading (multiple files) from the commandline is possible, with curl
something like:
curl -X POST http://127.0.0.1:8000/upload -F 'files=@multiple-example-1.txt' -F 'files=@multiple-example-2.txt'
More info here: https://github.com/Densaugeo/uploadserver
EDIT: To get your local ip-address, from terminal: ip addr show | grep -w "inet" | grep -v "127.0.0.1" | awk '{print $2}' | cut -d "/" -f 1