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
|
||||
#[serde(default = "default_sync_log_retention")]
|
||||
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 {
|
||||
|
|
@ -673,6 +676,10 @@ fn default_sync_log_retention() -> u64 {
|
|||
90 // 90 days
|
||||
}
|
||||
|
||||
fn default_temp_upload_dir() -> PathBuf {
|
||||
Config::default_data_dir().join("temp_uploads")
|
||||
}
|
||||
|
||||
impl Default for SyncConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
|
|
@ -683,6 +690,7 @@ impl Default for SyncConfig {
|
|||
upload_timeout_hours: default_upload_timeout(),
|
||||
max_concurrent_uploads: default_max_concurrent_uploads(),
|
||||
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