pub fn add_file_field(&mut self, field_name: String, file_name: String, mime: &Mime, data: &[u8]) {
        let content_disposition = ContentDisposition::FormData(Some(field_name), Filename::with_name(file_name));
        let _ = write!(&mut self.storage, "--{}\r\nContent-Disposition: {}\r\n", self.boundary, content_disposition);
        let _ = write!(&mut self.storage, "Content-Type: {}\r\n\r\n", mime);
        let _ = self.storage.write(data);
        let _ = write!(&mut self.storage, "\r\n--{}\r\n", self.boundary);
    }
///Adds new field with file.
Adds new field with file.
Adds new field with file .
pub fn add_file_field(&mut self, field_name: String, file_name: String, mime: &Mime, data: &[u8]) {
        let content_disposition = ContentDisposition::FormData(Some(field_name), Filename::with_name(file_name));
        let _ = write!(&mut self.storage, "--{}\r\nContent-Disposition: {}\r\n", self.boundary, content_disposition);
        let _ = write!(&mut self.storage, "Content-Type: {}\r\n\r\n", mime);
        let _ = self.storage.write(data);
        let _ = write!(&mut self.storage, "\r\n--{}\r\n", self.boundary);
    }
pub fn add_file_field ( & mut self , field_name : String , file_name : String , mime : & Mime , data : & [ u8 ] ) { let content_disposition = ContentDisposition :: FormData ( Some ( field_name ) , Filename :: with_name ( file_name ) ) ; let _ = write ! ( mut self storage " \r \n \r \n " self boundary content_disposition ) ; let _ = write ! ( mut self storage " \r \n \r \n " mime ) ; let _ = self . storage . write ( data ) ; let _ = write ! ( mut self storage " \r \n \r \n " self boundary ) ; }
Adds new field with file.
Adds new field with file .
&mut self
field_name
String
file_name
String
mime
&Mime
data
&[u8]