mirror of
https://github.com/Waradu/streamshare.git
synced 2025-04-21 11:54:09 +02:00
715 B
715 B
Streamshare
Upload files to streamshare
Example:
Upload:
let show_progress = true;
match upload(&file_path, show_progress).await {
Ok((file_identifier, _deletion_token)) => {
let download_url = format!(
"https://streamshare.wireway.ch/download/{}",
file_identifier
);
println!("File uploaded successfully");
println!("Download URL: {}", download_url);
}
Err(e) => eprintln!("Error: {}", e),
}
Delete:
match streamshare::delete(file_identifier, deletion_token).await {
Ok(_) => println!("File deleted successfully"),
Err(e) => eprintln!("Error deleting file: {}", e),
}