aboutsummaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
authorLzzzt <liuzitao0123@gmail.com>2023-10-27 13:25:57 +0000
committerLzzzt <liuzitao0123@gmail.com>2025-03-03 06:49:25 +0000
commitaefe3683d3ff0d579e79f06ccdc7e408ae9b3a4a (patch)
treecf0cb1d515d74370fda14b84beb79d8e28517684 /src/config.rs
parentAdd CHANGELOG entry for #1431 (diff)
downloadminiserve-aefe3683d3ff0d579e79f06ccdc7e408ae9b3a4a.tar.gz
miniserve-aefe3683d3ff0d579e79f06ccdc7e408ae9b3a4a.zip
Show File Size in Bytes
Add a cli option that show file size in bytes rather than KB or MB, etc.
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 4404959..03d3f4b 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -158,6 +158,9 @@ pub struct MiniserveConfig {
/// If enabled, respond to WebDAV requests (read-only).
pub webdav_enabled: bool,
+ /// If enabled, will show in exact byte size of the file
+ pub show_size_in_byte: bool,
+
/// If set, use provided rustls config for TLS
#[cfg(feature = "tls")]
pub tls_rustls_config: Option<rustls::ServerConfig>,
@@ -320,6 +323,7 @@ impl MiniserveConfig {
webdav_enabled: args.enable_webdav,
tls_rustls_config: tls_rustls_server_config,
compress_response: args.compress_response,
+ show_size_in_byte: args.show_size_in_byte,
})
}
}