All checks were successful
build docker container automatically / build (push) Successful in 3m29s
34 lines
784 B
Rust
34 lines
784 B
Rust
#[cfg(feature = "server")]
|
|
pub struct ServerConfig {
|
|
pub upload_folder: String,
|
|
pub db_url: String,
|
|
|
|
pub upload_storage_limit_soft: u64,
|
|
pub upload_storage_limit_hard: u64,
|
|
}
|
|
|
|
#[cfg(feature = "server")]
|
|
impl ServerConfig {
|
|
pub fn load() -> Self {
|
|
Self {
|
|
upload_folder: "./uploads/".to_string(),
|
|
db_url: std::env::var("HTTPSERVER_DATABASE_URL").expect("missing HTTPSERVER_DATABASE_URL"),
|
|
|
|
upload_storage_limit_soft: 1024 * 1024 * 1024 * 200,
|
|
upload_storage_limit_hard: 1024 * 1024 * 1024 * 300,
|
|
}
|
|
}
|
|
}
|
|
|
|
pub struct ClientConfig {
|
|
pub upload_max_size: u64,
|
|
}
|
|
|
|
impl ClientConfig {
|
|
pub fn load() -> Self {
|
|
Self {
|
|
upload_max_size: 1024 * 1024 * 1024 * 50,
|
|
}
|
|
}
|
|
}
|