diff --git a/contrib/chorus.toml b/contrib/chorus.toml index 2108951..e360bd6 100644 --- a/contrib/chorus.toml +++ b/contrib/chorus.toml @@ -299,3 +299,16 @@ throttling_bytes_per_second = 1024576 # Default is 16777216 bytes. # throttling_burst = 16777216 + + +# Blossom server directory +# +# Set to a filesystem directory where you want chorus to store files. +# +# Blossom allows clients to upload files making them available for the public to download. +# Our implementation makes all files publicly readable, but only chorus users can upload +# or delete. See https://github.com/hzrd149/blossom +# +# Default is not set +# +# blossom_directory = diff --git a/docs/CONFIG.md b/docs/CONFIG.md index 7d58c91..3de5492 100644 --- a/docs/CONFIG.md +++ b/docs/CONFIG.md @@ -257,3 +257,15 @@ second. If that bucket doesn't have enough, the burst won't be allowed and the c will be closed. Default is 16777216 bytes. + +### blossom_directory + +Blossom server directory + +Set to a filesystem directory where you want chorus to store files. + +Blossom allows clients to upload files making them available for the public to download. +Our implementation makes all files publicly readable, but only chorus users can upload +or delete. See https://github.com/hzrd149/blossom + +Default is None diff --git a/src/config.rs b/src/config.rs index d6d3450..ecbb13e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -40,6 +40,7 @@ pub struct FriendlyConfig { pub max_connections_per_ip: usize, pub throttling_bytes_per_second: usize, pub throttling_burst: usize, + pub blossom_directory: Option, } impl Default for FriendlyConfig { @@ -77,6 +78,7 @@ impl Default for FriendlyConfig { max_connections_per_ip: 5, throttling_bytes_per_second: 1024 * 1024, throttling_burst: 1024 * 1024 * 16, + blossom_directory: None, } } } @@ -116,6 +118,7 @@ impl FriendlyConfig { max_connections_per_ip, throttling_bytes_per_second, throttling_burst, + blossom_directory, } = self; let mut public_key: Option = None; @@ -177,6 +180,7 @@ impl FriendlyConfig { max_connections_per_ip, throttling_bytes_per_second, throttling_burst, + blossom_directory, }) } } @@ -217,6 +221,7 @@ pub struct Config { pub max_connections_per_ip: usize, pub throttling_bytes_per_second: usize, pub throttling_burst: usize, + pub blossom_directory: Option, } impl Default for Config {