a rust lib to upload and delete files to/from streamshare
Find a file
2024-10-19 22:52:32 +02:00
src added delete function 2024-10-19 22:52:32 +02:00
.gitignore init 2024-10-19 22:20:44 +02:00
Cargo.lock added delete function 2024-10-19 22:52:32 +02:00
Cargo.toml added delete function 2024-10-19 22:52:32 +02:00
README.md added delete function 2024-10-19 22:52:32 +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(identifier, deltoken).await {
    Ok(_) => println!("File deleted successfully"),
    Err(e) => eprintln!("Error deleting file: {}", e),
}