diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2022-10-12 19:52:46 +0000 |
---|---|---|
committer | Sven-Hendrik Haase <svenstaro@gmail.com> | 2022-10-12 20:07:30 +0000 |
commit | dba2f9ea7e70b72f886e9aa56744304659f4bbca (patch) | |
tree | 6a84299c0ec967d508eebf0e4dfbb1c0f0e98006 /README.md | |
parent | Upgrade clap to v4 (diff) | |
download | miniserve-dba2f9ea7e70b72f886e9aa56744304659f4bbca.tar.gz miniserve-dba2f9ea7e70b72f886e9aa56744304659f4bbca.zip |
Explain required argument disambiguation with -u
Fixes #919.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -64,12 +64,19 @@ Sometimes this is just a more practical and quick way than doing things properly ### Upload a file using `curl`: # in one terminal - miniserve -u . + miniserve -u -- . # in another terminal curl -F "path=@$FILE" http://localhost:8080/upload\?path\=/ (where `$FILE` is the path to the file. This uses miniserve's default port of 8080) +Note that for uploading, we have to use `--` to disambiguate the argument to `-u`. +This is because `-u` can also take a path (or multiple). If a path argument to `-u` is given, +uploading will only be possible to the provided paths as opposed to every path. + +Another effect of this is that you can't just combine flags like this `-uv` when `-u` is used. In +this example, you'd need to use `-u -v`. + ### Create a directory using `curl`: # in one terminal |