How to upload the pictures by create_signal? #2537
Unanswered
callmeitachi
asked this question in
Q&A
Replies: 2 comments 3 replies
-
I'm sorry, I do not understand what the title means and the body of the message is just a blank image. |
Beta Was this translation helpful? Give feedback.
3 replies
-
First, make sure you enable the [dependencies]
web-sys = { version = "0.3", features = ["FileList"] } Here is how you get a view! {
<input
type="file"
name="remain1"
on:input=move |ev| {
let files = ev.target().unwrap().unchecked_ref::<web_sys::HtmlInputElement>().files().unwrap();
web_sys::console::log_1(&files);
}
/>
} Note that as soon as you're in the event listener here, Leptos isn't providing any helper functions. This is just using the plain Now you can do whatever you want with the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Beta Was this translation helpful? Give feedback.
All reactions