a rust lib to upload and delete files to/from streamshare
Find a file
2024-10-19 23:03:25 +02:00
src fixed delet function naming 2024-10-19 23:03:25 +02:00
.gitignore init 2024-10-19 22:20:44 +02:00
Cargo.lock fixed delet function naming 2024-10-19 23:03:25 +02:00
Cargo.toml fixed delet function naming 2024-10-19 23:03:25 +02:00
README.md fixed delet function naming 2024-10-19 23:03:25 +02:00

Streamshare

Upload files to streamshare

Example:

Upload:

match upload(&file_path).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),
}