feat: update osssendfilers

This commit is contained in:
2025-10-10 00:24:50 +08:00
parent f74931f8bd
commit 85e442f114
3 changed files with 12 additions and 7 deletions

View File

@@ -103,6 +103,7 @@ struct SendFileResponse {
length: i64, length: i64,
etag: String, etag: String,
sha256: String, sha256: String,
cdn_url: Option<String>,
} }
#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Default)] #[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Default)]
@@ -240,6 +241,10 @@ async fn main() -> XResult<()> {
} }
} }
if let Some(cnd_url) = send_file_response.cdn_url {
success!("CDN URL: {}", cnd_url);
}
success!("File {} upload success", filename); success!("File {} upload success", filename);
Ok(()) Ok(())
} }
@@ -376,5 +381,5 @@ async fn parse_sts_response(response: Response) -> XResult<Sts> {
Ok(sts) Ok(sts)
} }
// @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20250621T103409+08:00.MEYCIQDO99vfBHCqgcp0hIux // @SCRIPT-SIGNATURE-V1: yk-r1.ES256.20251010T002421+08:00.MEQCIDpVktuwmcLXHLxEDQYk
// t/iN3yat60z0avv43CMumIfZUQIhAJpUfRVro3Bf/bOHH7c3P4AtBZQ3CItZf57e2Gqs2Oqk // C22TommHKEEhA6lpSqVGtIXqAiBMe7RqBUIfXYUd/+4Nu960nGuQq0m1Z6xcE527UOH0Zg==

View File

@@ -74,11 +74,11 @@
}, },
"osssendfile.rs": { "osssendfile.rs": {
"script_name": "osssendfile.rs", "script_name": "osssendfile.rs",
"script_length": 14019, "script_length": 14153,
"script_sha256": "2f18f0f2e66f05a0218347e72df5e9115e4ce469602693da06963afead464749", "script_sha256": "48a41196a640a3f34a56a40c4b292cb71cf55dbab479a3bd032219af727895da",
"script_full_url": "https://git.hatter.ink/rust-scripts/scriptbase/raw/branch/main/osssendfile-rs/src/main.rs", "script_full_url": "https://git.hatter.ink/rust-scripts/scriptbase/raw/branch/main/osssendfile-rs/src/main.rs",
"publish_time": 1737272563311, "publish_time": 1737272563311,
"update_time": 1757430653322 "update_time": 1760027083520
}, },
"post.rs": { "post.rs": {
"script_name": "post.rs", "script_name": "post.rs",

View File

@@ -41,8 +41,8 @@
}, },
"osssendfile-rs": { "osssendfile-rs": {
"script_name": "osssendfile-rs", "script_name": "osssendfile-rs",
"script_length": 14019, "script_length": 14153,
"script_sha256": "2f18f0f2e66f05a0218347e72df5e9115e4ce469602693da06963afead464749" "script_sha256": "48a41196a640a3f34a56a40c4b292cb71cf55dbab479a3bd032219af727895da"
}, },
"post-rs": { "post-rs": {
"script_name": "post-rs", "script_name": "post-rs",