mirror of
https://github.com/Waradu/streamshare.git
synced 2025-04-21 11:54:09 +02:00
added delete function
This commit is contained in:
parent
67788708fd
commit
04846fc51a
4 changed files with 38 additions and 8 deletions
|
@ -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),
|
||||
}
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue