From 7a043ac16001ae6f7926bf8b2ad733ccf07224b7 Mon Sep 17 00:00:00 2001 From: Waradu Date: Sun, 20 Oct 2024 10:07:37 +0200 Subject: [PATCH] you can now see progress in the output --- Cargo.lock | 6 +++--- Cargo.toml | 4 ++-- src/main.rs | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 9c828ad..cb6a009 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1191,9 +1191,9 @@ checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "streamshare" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b858ea2a485166fdb9850afa3016d4bd1cd131fd13bab39b74c1e860cfd93a4b" +checksum = "723b8059b8580d19ea0bdd3202fc8ba38c01719ee5ad2d5b70e530e8f3c5e22e" dependencies = [ "futures", "reqwest", @@ -1306,7 +1306,7 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "to-streamshare" -version = "0.2.2" +version = "0.3.0" dependencies = [ "clap", "streamshare", diff --git a/Cargo.toml b/Cargo.toml index 6a9f482..832d3fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "to-streamshare" -version = "0.2.2" +version = "0.3.0" edition = "2021" description = "Upload to streamshare (to-ss > toss) from the terminal" license = "MIT" @@ -12,7 +12,7 @@ keywords = ["streamshare","file-sharing","upload"] [dependencies] clap = { version = "4.5.20", features = ["derive"] } -streamshare = "1" +streamshare = "2" tokio = { version = "1.40.0", features = ["full"] } [[bin]] diff --git a/src/main.rs b/src/main.rs index 936b74f..802fd91 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,8 +20,8 @@ async fn main() { let args = Args::parse(); if let Some(delete_param) = args.delete { - if let Some((identifier, deltoken)) = parse_delete_param(&delete_param) { - match streamshare::delete(identifier, deltoken).await { + if let Some((file_identifier, deletion_token)) = parse_delete_param(&delete_param) { + match streamshare::delete(file_identifier, deletion_token).await { Ok(_) => println!("File deleted successfully"), Err(e) => eprintln!("Error deleting file: {}", e), } @@ -29,7 +29,7 @@ async fn main() { eprintln!("Invalid format for --delete. Use 'file_identifier/deletion_token' (e.g., 'abc123/def456')"); } } else if let Some(file_path) = args.file { - match upload(&file_path).await { + match upload(&file_path, true).await { Ok((file_identifier, deletion_token)) => { let download_url = format!( "https://streamshare.wireway.ch/download/{}",