# uploadserver A simple HTTP file upload server with no external dependencies. - Python 3.10+ (including 3.13+) - Standard library only ## Installation ```bash uv sync ``` ## Usage ```bash # Start server with default settings (port 8000, form field "file") uv run uploadserver # Custom port and form field name uv run uploadserver -p 9000 -k document # Raw body mode - save POST body directly to a file uv run uploadserver --raw -o /tmp/received.bin ``` ## Options | Option | Description | |--------|-------------| | `-p, --port PORT` | Port to listen on (default: 8000) | | `-k, --key NAME` | Form field name for file uploads (default: file) | | `--raw` | Accept raw request body as file | | `-o, --output PATH` | Output path for raw mode (required with --raw) | | `-d, --debug` | Print incoming requests to stderr | ## Examples Upload via browser: ``` Open http://localhost:8000 and use the form ``` Upload via curl (multipart): ```bash curl -F "file=@myfile.txt" http://localhost:8000 ``` Upload via curl (raw mode): ```bash curl -X POST --data-binary @myfile.txt http://localhost:8000 ```