#How does tauri handle file types?

4 messages · Page 1 of 1 (latest)

thorn umbra
#

I've got an app that has a file input in the html code and I have to send that file to my rust code. How can I do it? Which type is used to represent a js File object in rust?

tropic lynx
#

Does the file input give your JS code the path? If so, that's what you'd send to Rust (and on the Rust side it may want to be PathBuf).

thorn umbra
abstract rapids
#

Yeah, then you have to send the bytes directly. We can't get the filesystem path from that input in tauri.