aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
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,