mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-22 13:29:21 +00:00
Add support for QuickTime videos
This commit is contained in:
parent
8ffb7b2b18
commit
dec582e9b7
@ -42,7 +42,7 @@ struct ConversationsPolicy {
|
|||||||
max_conversation_name_len: usize,
|
max_conversation_name_len: usize,
|
||||||
min_message_len: usize,
|
min_message_len: usize,
|
||||||
max_message_len: usize,
|
max_message_len: usize,
|
||||||
allowed_files_type: [&'static str; 17],
|
allowed_files_type: [&'static str; 18],
|
||||||
files_max_size: usize,
|
files_max_size: usize,
|
||||||
writing_event_interval: u64,
|
writing_event_interval: u64,
|
||||||
writing_event_lifetime: u64,
|
writing_event_lifetime: u64,
|
||||||
|
@ -184,11 +184,12 @@ pub mod conversations {
|
|||||||
pub const MAX_CONVERSATION_MESSAGE_LENGTH: usize = 16000;
|
pub const MAX_CONVERSATION_MESSAGE_LENGTH: usize = 16000;
|
||||||
|
|
||||||
/// Allowed files type in conversations
|
/// Allowed files type in conversations
|
||||||
pub const ALLOWED_CONVERSATION_FILES_TYPES: [&str; 17] = [
|
pub const ALLOWED_CONVERSATION_FILES_TYPES: [&str; 18] = [
|
||||||
"image/png", "image/jpeg", "image/gif", "image/bmp",
|
"image/png", "image/jpeg", "image/gif", "image/bmp",
|
||||||
"application/pdf",
|
"application/pdf",
|
||||||
"audio/mpeg",
|
"audio/mpeg",
|
||||||
"video/mp4",
|
"video/mp4",
|
||||||
|
"video/quicktime",
|
||||||
"application/zip",
|
"application/zip",
|
||||||
|
|
||||||
// MS Office docs
|
// MS Office docs
|
||||||
|
@ -331,7 +331,7 @@ pub fn send_message(r: &mut HttpRequestHandler) -> RequestResult {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MP4
|
// MP4
|
||||||
else if mime_type.eq("video/mp4") {
|
else if mime_type.eq("video/mp4") || mime_type.eq("video/quicktime") {
|
||||||
path = r.save_post_mp4("file", "conversation")?;
|
path = r.save_post_mp4("file", "conversation")?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user