Add new types to supported media types list
This commit is contained in:
parent
4d29c83365
commit
3ed610969e
2 changed files with 6 additions and 3 deletions
|
@ -28,7 +28,7 @@ struct InstanceStatusLimits {
|
|||
|
||||
#[derive(Serialize)]
|
||||
struct InstanceMediaLimits {
|
||||
supported_mime_types: [&'static str; 4],
|
||||
supported_mime_types: [&'static str; 7],
|
||||
image_size_limit: usize,
|
||||
}
|
||||
|
||||
|
|
|
@ -13,11 +13,14 @@ use mime_guess::get_mime_extensions_str;
|
|||
use mime_sniffer::MimeTypeSniffer;
|
||||
use sha2::{Digest, Sha256};
|
||||
|
||||
pub const SUPPORTED_MEDIA_TYPES: [&str; 4] = [
|
||||
pub const SUPPORTED_MEDIA_TYPES: [&str; 7] = [
|
||||
"audio/mpeg",
|
||||
"image/gif",
|
||||
"image/jpeg",
|
||||
"image/png",
|
||||
"image/gif",
|
||||
"image/webp",
|
||||
"video/mp4",
|
||||
"video/webm",
|
||||
];
|
||||
|
||||
pub fn sniff_media_type(data: &[u8]) -> Option<String> {
|
||||
|
|
Loading…
Reference in a new issue