feat: update osssendfile
This commit is contained in:
@@ -250,6 +250,19 @@ async fn main() -> XResult<()> {
|
||||
}
|
||||
|
||||
fn load_config(config: &Option<String>) -> XResult<OssSendFileConfig> {
|
||||
if let Some(config_str) = config {
|
||||
if let Ok(oss_send_config) = serde_json::from_str::<OssSendFileConfig>(config_str) {
|
||||
return Ok(oss_send_config);
|
||||
}
|
||||
if let Ok(config_vec) = STANDARD.decode(config_str) {
|
||||
if let Ok(config_str_ori) = String::from_utf8(config_vec) {
|
||||
if let Ok(oss_send_config) = serde_json::from_str::<OssSendFileConfig>(&config_str_ori) {
|
||||
return Ok(oss_send_config);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let config_file_opt = util_file::read_config(
|
||||
config.clone(),
|
||||
&[OSS_SEND_FILE_CONFIG_FILE.to_string()],
|
||||
@@ -381,5 +394,5 @@ async fn parse_sts_response(response: Response) -> XResult<Sts> {
|
||||
Ok(sts)
|
||||
}
|
||||
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20251010T002421+08:00.MEQCIDpVktuwmcLXHLxEDQYk
|
||||
// C22TommHKEEhA6lpSqVGtIXqAiBMe7RqBUIfXYUd/+4Nu960nGuQq0m1Z6xcE527UOH0Zg==
|
||||
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20251013T233142+08:00.MEQCIAJA6GipLx8rl7COAqr6
|
||||
// tn8fjlnwNyfgKsqJ9xq/ESefAiAIuLmVwnSAe20Rz4YCf2yd1OQpueEDh4yaaj5pFSuxdA==
|
||||
|
||||
Reference in New Issue
Block a user