pub fn file(mut self, file: Uploaded) -> Self {
        let mime_type = self.get_file_mime(&file);
        let file_name = file.name().to_string();
        self.media = Some(
            tl::types::InputMediaUploadedDocument {
                nosound_video: false,
                force_file: true,
                file: file.input_file,
                thumb: None,
                mime_type,
                attributes: vec![tl::types::DocumentAttributeFilename { file_name }.into()],
                stickers: None,
                ttl_seconds: self.media_ttl,
            }
            .into(),
        );
        self
    }
/// Include the uploaded file as a document file in the message.
///
/// You can use this to send any type of media as a simple document file.
///
/// The text will be the caption of the file, which may be empty for no caption.
Include the uploaded file as a document file in the message.
You can use this to send any type of media as a simple document file.

The text will be the caption of the file, which may be empty for no caption.
Include the uploaded file as a document file in the message . You can use this to send any type of media as a simple document file . The text will be the caption of the file which may be empty for no caption .
pub fn file(mut self, file: Uploaded) -> Self {
        let mime_type = self.get_file_mime(&file);
        let file_name = file.name().to_string();
        self.media = Some(
            tl::types::InputMediaUploadedDocument {
                nosound_video: false,
                force_file: true,
                file: file.input_file,
                thumb: None,
                mime_type,
                attributes: vec![tl::types::DocumentAttributeFilename { file_name }.into()],
                stickers: None,
                ttl_seconds: self.media_ttl,
            }
            .into(),
        );
        self
    }
pub fn file ( mut self , file : Uploaded ) -> Self { let mime_type = self . get_file_mime ( & file ) ; let file_name = file . name ( ) . to_string ( ) ; self . media = Some ( tl :: types :: InputMediaUploadedDocument { nosound_video : false , force_file : true , file : file . input_file , thumb : None , mime_type , attributes : vec ! [ tl types DocumentAttributeFilename { file_name } into ( ) ] , stickers : None , ttl_seconds : self . media_ttl , } . into ( ) , ) ; self }
Include the uploaded file as a document file in the message.
Include the uploaded file as a document file in the message .
mut self
file
Uploaded
mut self
file
Uploaded