squigit-brain 0.1.1

Gemini attachment preparation and title generation for Squigit
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2026 a7mddra
// SPDX-License-Identifier: Apache-2.0

pub fn mime_from_extension(ext: &str) -> &str {
    match ext.to_lowercase().as_str() {
        "png" => "image/png",
        "jpg" | "jpeg" => "image/jpeg",
        "webp" => "image/webp",
        "gif" => "image/gif",
        "bmp" => "image/bmp",
        "svg" => "image/svg+xml",
        "pdf" => "application/pdf",
        _ => "application/octet-stream",
    }
}