-
Context: I'm implementing file drag/drop for a Rust/wasm32 webapp.
-
I'm using stdweb. I am using the DragDropEvent. From this, I get a FileList. From this, I print out the names of the files:
let n = file_list.len();
let msg = format!("handling dro pevent, num files: {:?}", n);
console!(log, msg);
for file in file_list.iter() {
let msg = format!("name: {:?}", file.name());
console!(log, msg);
}
Now, file
is an object of type stdweb::web::File - Rust
- here is my problem: I can use
file.name()
to get the name of the file -- but how do I extract the data from theFile
object ?