pinakes-core: add temp_upload_dir config for chunked uploads
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I8755811424ed2909c5fe4f75e6cf030d6a6a6964
This commit is contained in:
parent
95527e4bca
commit
5146924f36
1 changed files with 8 additions and 0 deletions
|
|
@ -651,6 +651,9 @@ pub struct SyncConfig {
|
||||||
/// Sync log retention in days
|
/// Sync log retention in days
|
||||||
#[serde(default = "default_sync_log_retention")]
|
#[serde(default = "default_sync_log_retention")]
|
||||||
pub sync_log_retention_days: u64,
|
pub sync_log_retention_days: u64,
|
||||||
|
/// Temporary directory for chunked upload storage
|
||||||
|
#[serde(default = "default_temp_upload_dir")]
|
||||||
|
pub temp_upload_dir: PathBuf,
|
||||||
}
|
}
|
||||||
|
|
||||||
fn default_max_sync_file_size() -> u64 {
|
fn default_max_sync_file_size() -> u64 {
|
||||||
|
|
@ -673,6 +676,10 @@ fn default_sync_log_retention() -> u64 {
|
||||||
90 // 90 days
|
90 // 90 days
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn default_temp_upload_dir() -> PathBuf {
|
||||||
|
Config::default_data_dir().join("temp_uploads")
|
||||||
|
}
|
||||||
|
|
||||||
impl Default for SyncConfig {
|
impl Default for SyncConfig {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
|
|
@ -683,6 +690,7 @@ impl Default for SyncConfig {
|
||||||
upload_timeout_hours: default_upload_timeout(),
|
upload_timeout_hours: default_upload_timeout(),
|
||||||
max_concurrent_uploads: default_max_concurrent_uploads(),
|
max_concurrent_uploads: default_max_concurrent_uploads(),
|
||||||
sync_log_retention_days: default_sync_log_retention(),
|
sync_log_retention_days: default_sync_log_retention(),
|
||||||
|
temp_upload_dir: default_temp_upload_dir(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue