aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md52
1 files changed, 52 insertions, 0 deletions
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..96e3d18
--- /dev/null
+++ b/README.md
@@ -0,0 +1,52 @@
+# 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
+```