diff options
author | Sven-Hendrik Haase <svenstaro@gmail.com> | 2019-04-05 19:43:44 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-05 19:43:44 +0000 |
commit | 46c29142f06af666283f23ba8b3d7fe072656803 (patch) | |
tree | c4ab92517a64c8057021f8b04c0eb9af38b1b64a /src/args.rs | |
parent | Merge pull request #57 from svenstaro/dependabot/cargo/serde-1.0.90 (diff) | |
parent | Improve file upload text. (diff) | |
download | miniserve-46c29142f06af666283f23ba8b3d7fe072656803.tar.gz miniserve-46c29142f06af666283f23ba8b3d7fe072656803.zip |
Merge pull request #58 from vojta7/file_uploading
File uploading
Diffstat (limited to 'src/args.rs')
-rw-r--r-- | src/args.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/args.rs b/src/args.rs index 4f0dbf7..bb52824 100644 --- a/src/args.rs +++ b/src/args.rs @@ -47,6 +47,14 @@ struct CLIArgs { /// Do not follow symbolic links #[structopt(short = "P", long = "no-symlinks")] no_symlinks: bool, + + /// Enable file uploading + #[structopt(short = "u", long = "upload-files")] + file_upload: bool, + + /// Enable overriding existing files during file upload + #[structopt(short = "o", long = "overwrite-files")] + overwrite_files: bool, } /// Checks wether an interface is valid, i.e. it can be parsed into an IP address @@ -100,5 +108,7 @@ pub fn parse_args() -> crate::MiniserveConfig { path_explicitly_chosen, no_symlinks: args.no_symlinks, random_route, + overwrite_files: args.overwrite_files, + file_upload: args.file_upload, } } |