diff options
Diffstat (limited to 'man')
| -rw-r--r-- | man/uploadserver.1 | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/man/uploadserver.1 b/man/uploadserver.1 new file mode 100644 index 0000000..64d6708 --- /dev/null +++ b/man/uploadserver.1 @@ -0,0 +1,87 @@ +.TH UPLOADSERVER 1 "January 2025" "uploadserver 0.1.0" "User Commands" +.SH NAME +uploadserver \- simple HTTP file upload server +.SH SYNOPSIS +.B uploadserver +[\fB\-p\fR \fIPORT\fR] +[\fB\-k\fR \fINAME\fR] +.br +.B uploadserver +\fB\-\-raw\fR \fB\-o\fR \fIPATH\fR +[\fB\-p\fR \fIPORT\fR] +.SH DESCRIPTION +.B uploadserver +is a simple HTTP server for receiving file uploads. It supports two modes: +multipart form uploads (default) and raw body uploads. +.PP +In default mode, it serves a web interface for uploading files and stores them +in an \fIuploads/\fR directory. In raw mode, it saves the raw POST request body +directly to a specified file. +.PP +The server uses only Python standard library modules and is compatible with +Python 3.10 and later, including Python 3.13+. +.SH OPTIONS +.TP +.BR \-p ", " \-\-port " " \fIPORT\fR +Port to listen on. Default is 8000. +.TP +.BR \-k ", " \-\-key " " \fINAME\fR +Form field name for file uploads in multipart mode. Default is "file". +.TP +.BR \-\-raw +Accept raw request body as file instead of multipart form data. +Requires \fB\-o\fR option. +.TP +.BR \-o ", " \-\-output " " \fIPATH\fR +Output file path for raw mode. Required when using \fB\-\-raw\fR. +.TP +.BR \-d ", " \-\-debug +Print incoming requests to stderr, including method, path, headers, and body size. +.SH EXAMPLES +Start server with defaults: +.PP +.RS +.nf +uploadserver +.fi +.RE +.PP +Use custom port and form field: +.PP +.RS +.nf +uploadserver -p 9000 -k document +.fi +.RE +.PP +Raw body mode: +.PP +.RS +.nf +uploadserver --raw -o /tmp/received.bin +.fi +.RE +.PP +Upload file with curl (multipart): +.PP +.RS +.nf +curl -F "file=@myfile.txt" http://localhost:8000 +.fi +.RE +.PP +Upload file with curl (raw): +.PP +.RS +.nf +curl -X POST --data-binary @myfile.txt http://localhost:8000 +.fi +.RE +.SH FILES +.TP +.I uploads/ +Default directory where uploaded files are stored (multipart mode). +.SH NOTES +This server has no external dependencies and uses only the Python standard library. +.SH AUTHORS +Written for use with uv. |
