Call upload method with static values
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
e26d1c9e19
commit
8fb2196955
1 changed files with 9 additions and 0 deletions
|
@ -7,6 +7,8 @@
|
||||||
use env_logger;
|
use env_logger;
|
||||||
use std::env::args;
|
use std::env::args;
|
||||||
use xmpp::{ClientBuilder, ClientType, Event};
|
use xmpp::{ClientBuilder, ClientType, Event};
|
||||||
|
use std::path::Path;
|
||||||
|
use xmpp::{ClientBuilder, ClientFeature, ClientType, Event};
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<(), Option<()>> {
|
async fn main() -> Result<(), Option<()>> {
|
||||||
|
@ -33,7 +35,14 @@ async fn main() -> Result<(), Option<()>> {
|
||||||
match event {
|
match event {
|
||||||
Event::Online => {
|
Event::Online => {
|
||||||
println!("Online.");
|
println!("Online.");
|
||||||
|
client.upload_file_with(
|
||||||
|
"share.serv.ice"
|
||||||
|
Path::new("/some/file/path"),
|
||||||
|
).await;
|
||||||
}
|
}
|
||||||
|
Event::HTTPUploadedFile(url) => {
|
||||||
|
println!("URL: {}", url);
|
||||||
|
},
|
||||||
Event::Disconnected => {
|
Event::Disconnected => {
|
||||||
println!("Disconnected");
|
println!("Disconnected");
|
||||||
return Err(None);
|
return Err(None);
|
||||||
|
|
Loading…
Reference in a new issue