aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2025-03-03 03:54:51 +0000
committerGitHub <noreply@github.com>2025-03-03 03:54:51 +0000
commitc26b74c8a9f47f86b39a687b20d769e3b349fd8d (patch)
tree1c562da6fbcba9900ce85e300cc9298a0ddf23c8 /src/config.rs
parentMerge pull request #1478 from svenstaro/dependabot/cargo/all-dependencies-65d... (diff)
parentfeat: validate temp dir exists through `value_parser` and fixed clippy issues (diff)
downloadminiserve-c26b74c8a9f47f86b39a687b20d769e3b349fd8d.tar.gz
miniserve-c26b74c8a9f47f86b39a687b20d769e3b349fd8d.zip
Merge pull request #1431 from AlecDivito/upload-progress-bar
feat: Added HTML and Javascript progress bar when uploading files
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 953bba1..4404959 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -33,6 +33,9 @@ pub struct MiniserveConfig {
/// Path to be served by miniserve
pub path: std::path::PathBuf,
+ /// Temporary directory that should be used when files are uploaded to the server
+ pub temp_upload_directory: Option<std::path::PathBuf>,
+
/// Port on which miniserve will be listening
pub port: u16,
@@ -101,6 +104,9 @@ pub struct MiniserveConfig {
/// Enable file upload
pub file_upload: bool,
+ /// Max amount of concurrency when uploading multiple files
+ pub web_upload_concurrency: usize,
+
/// List of allowed upload directories
pub allowed_upload_dir: Vec<String>,
@@ -275,6 +281,7 @@ impl MiniserveConfig {
Ok(Self {
verbose: args.verbose,
path: args.path.unwrap_or_else(|| PathBuf::from(".")),
+ temp_upload_directory: args.temp_upload_directory,
port,
interfaces,
auth,
@@ -295,6 +302,7 @@ impl MiniserveConfig {
show_qrcode: args.qrcode,
mkdir_enabled: args.mkdir_enabled,
file_upload: args.allowed_upload_dir.is_some(),
+ web_upload_concurrency: args.web_upload_concurrency,
allowed_upload_dir,
uploadable_media_type,
tar_enabled: args.enable_tar,