mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
21 lines
389 B
Rust
21 lines
389 B
Rust
use anyhow::Result;
|
|
use yazi_macro::succ;
|
|
use yazi_parser::mgr::UploadForm;
|
|
use yazi_shared::data::Data;
|
|
|
|
use crate::{Actor, Ctx};
|
|
|
|
pub struct Upload;
|
|
|
|
impl Actor for Upload {
|
|
type Form = UploadForm;
|
|
|
|
const NAME: &str = "upload";
|
|
|
|
fn act(cx: &mut Ctx, form: Self::Form) -> Result<Data> {
|
|
for url in form.urls {
|
|
cx.tasks.scheduler.file_upload(url.into_owned());
|
|
}
|
|
succ!();
|
|
}
|
|
}
|