Skip to main content

qubit_mime/
common_mime_types.rs

1/*******************************************************************************
2 *
3 *    Copyright (c) 2026 Haixing Hu.
4 *
5 *    SPDX-License-Identifier: Apache-2.0
6 *
7 *    Licensed under the Apache License, Version 2.0.
8 *
9 ******************************************************************************/
10//! Common MIME type constants.
11//!
12
13/// Microsoft Excel MIME types.
14pub const EXCEL_MIME_TYPES: &[&str] = &[
15    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
16    "application/vnd.ms-excel",
17];
18
19/// Default Microsoft Excel MIME type.
20pub const EXCEL_MIME_TYPE: &str =
21    "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
22
23/// Microsoft Word MIME types.
24pub const WORD_MIME_TYPES: &[&str] = &[
25    "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
26    "application/msword",
27];
28
29/// Default Microsoft Word MIME type.
30pub const WORD_MIME_TYPE: &str =
31    "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
32
33/// Microsoft PowerPoint MIME types.
34pub const POWERPOINT_MIME_TYPES: &[&str] = &[
35    "application/vnd.openxmlformats-officedocument.presentationml.presentation",
36    "application/vnd.ms-powerpoint",
37    "application/vnd.openxmlformats-officedocument.presentationml.slideshow",
38];
39
40/// Default Microsoft PowerPoint MIME type.
41pub const POWERPOINT_MIME_TYPE: &str =
42    "application/vnd.openxmlformats-officedocument.presentationml.presentation";
43
44/// PDF MIME type.
45pub const PDF_MIME_TYPE: &str = "application/pdf";
46
47/// PDF MIME types.
48pub const PDF_MIME_TYPES: &[&str] = &[PDF_MIME_TYPE];
49
50/// JSON MIME type.
51pub const JSON_MIME_TYPE: &str = "application/json";
52
53/// JSON MIME types.
54pub const JSON_MIME_TYPES: &[&str] = &[JSON_MIME_TYPE];
55
56/// XML MIME type.
57pub const XML_MIME_TYPE: &str = "application/xml";
58
59/// XML MIME types.
60pub const XML_MIME_TYPES: &[&str] = &[XML_MIME_TYPE];
61
62/// CSV MIME type.
63pub const CSV_MIME_TYPE: &str = "text/csv";
64
65/// CSV MIME types.
66pub const CSV_MIME_TYPES: &[&str] = &[CSV_MIME_TYPE];
67
68/// PNG MIME type.
69pub const PNG_MIME_TYPE: &str = "image/png";
70
71/// JPEG MIME type.
72pub const JPEG_MIME_TYPE: &str = "image/jpeg";
73
74/// GIF MIME type.
75pub const GIF_MIME_TYPE: &str = "image/gif";
76
77/// MP4 MIME type.
78pub const MP4_MIME_TYPE: &str = "video/mp4";
79
80/// MP3 MIME type.
81pub const MP3_MIME_TYPE: &str = "audio/mpeg";
82
83/// WAV MIME type.
84pub const WAV_MIME_TYPE: &str = "audio/wav";
85
86/// OGG audio MIME type.
87pub const OGG_MIME_TYPE: &str = "audio/ogg";
88
89/// WEBM video MIME type.
90pub const WEBM_MIME_TYPE: &str = "video/webm";
91
92/// AVI MIME type.
93pub const AVI_MIME_TYPE: &str = "video/x-msvideo";
94
95/// FLV MIME type.
96pub const FLV_MIME_TYPE: &str = "video/x-flv";
97
98/// QuickTime MIME type.
99pub const MOV_MIME_TYPE: &str = "video/quicktime";
100
101/// WMV MIME type.
102pub const WMV_MIME_TYPE: &str = "video/x-ms-wmv";