Densaugeo/uploadserver ? reverse-engineered prompt
Reverse engineered prompt
Build me a simple Python file server that works like the built in http.server, but adds a friendly upload page at /upload so I can send files to a folder from a browser or with curl.
I want it to run from the command line with the usual kind of options for choosing the port, bind address, and serving directory. It should support uploading one or more files at once, and if a file already exists, it should rename the new one by default unless I choose to replace it. Please include optional basic authentication, with a mode that protects both downloads and uploads and another mode that protects uploads only.
It would also be great if the upload page can switch between light and dark mode automatically, with an option to force either one. If possible, let me run it over HTTPS too, and support client certificates for mutual TLS. Keep it lightweight and easy to run, and make the upload page clean and straightforward.
Are you gonna build this?
make sure you review the code using coderabbit