Function catbox::file::from_file

source ·
pub async fn from_file<S: Into<String>>(
    file_path: S,
    user_hash: Option<S>
) -> Result<String, Box<dyn Error>>
Expand description

Upload a file to catbox.

Returns an URL to the file

See https://catbox.moe/faq.php for allowed formats and content.

Arguments

  • file_path - Path to the file to be uploaded
  • user_hash - User’s account hash, required for deleting. (Optional)