pub fn extract_form_file_body<T: StreamReader>(
reader: &mut T,
body_buffer: &mut Vec<u8>,
boundary: &String,
form_part: &mut FormPart,
form_part_limit: Option<&FormPartLimit>,
) -> Result<FormPartResult, MultipartFormDataError>Expand description
It writes the file to temporary file. Example to copy file
// Example to copy temp file
let filename = &form_part.filename.unwrap();
let owned = filename.to_owned();
let path = temp_file.path();
fs::copy(path, owned).expect("Error copying");