feat: updates

This commit is contained in:
2025-01-15 00:53:30 +08:00
parent ef08df173a
commit 83b2687388
2 changed files with 2 additions and 2 deletions

View File

@@ -245,7 +245,7 @@ fn process_config_item(options: &Options, config_item: &OSSBackupdConfigItem,
if options.verbose {
debugging!("Upload file: {}", temp_encrypted_file);
}
if let Err(e) = oss_client.put_file(bucket, &temp_new_file, oss_util::DEFAULT_URL_VALID_IN_SECS, file_temp_encrypted_file) {
if let Err(e) = oss_client.put_file(bucket, &temp_new_file, DEFAULT_URL_VALID_IN_SECS, file_temp_encrypted_file) {
failure!("Error in encrypt file: {}, at item index: {}", e, item_index);
remove_temp_files();
return Ok(());

View File

@@ -35,7 +35,7 @@ impl OSSClient {
pub fn put_file(&self, bucket_name: &str, key: &str, expire_in_seconds: u64, file: File) -> XResult<Response> {
let client = Client::new();
Ok(client.put(&self.generate_signed_put_url(bucket_name, key, expire_in_seconds)).body(file).send()?)
Ok(client.put(self.generate_signed_put_url(bucket_name, key, expire_in_seconds)).body(file).send()?)
}
pub fn delete_file(&self, bucket_name: &str, key: &str) -> XResult<Response> {