added delete function

This commit is contained in:
Waradu 2024-10-19 22:52:32 +02:00
parent 67788708fd
commit 04846fc51a
No known key found for this signature in database
GPG key ID: F85AAC8BA8B8DAAD
4 changed files with 38 additions and 8 deletions

View file

@ -4,6 +4,7 @@ Upload files to [streamshare](https://streamshare.wireway.ch)
#### Example:
Upload:
```rust
match upload(&file_path).await {
Ok((file_identifier, _deletion_token)) => {
@ -18,3 +19,11 @@ match upload(&file_path).await {
Err(e) => eprintln!("Error: {}", e),
}
```
Delete:
```rust
match streamshare::delete(identifier, deltoken).await {
Ok(_) => println!("File deleted successfully"),
Err(e) => eprintln!("Error deleting file: {}", e),
}
```