Closed benjamingb closed 3 years ago
You can use the UploadValue::into_read
function to get std::io::Read
, and then write the content to a new file.
with UploadValue::into_read
I can read but only .csv files,
let mut content = String::new();
upload.into_read().read_to_string(&mut content).unwrap();
I would like to upload images and put it on a disk path. I am new to Rust and I have not managed to do it, can you guide me?
with
UploadValue::into_read
I can read but only .csv files,let mut content = String::new(); upload.into_read().read_to_string(&mut content).unwrap();
I would like to upload images and put it on a disk path. I am new to Rust and I have not managed to do it, can you guide me?
You should use Read::read_to_end
to read binary files.
How can I move the file to a folder?
I am using the following example
I am using Actix-web 3.1