mirror of
https://github.com/hexastack/hexabot
synced 2025-02-23 21:04:15 +00:00
fix: updated attachments mime types
This commit is contained in:
parent
1288eb87cf
commit
294c075867
@ -6,24 +6,46 @@
|
|||||||
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
|
* 2. All derivative works must include clear attribution to the original creator and software, Hexastack and Hexabot, in a prominent location (e.g., in the software's "About" section, documentation, and README file).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
import { IAttachment } from "@/types/attachment.types";
|
import { IAttachment } from "@/types/attachment.types";
|
||||||
import { FileType, TAttachmentForeignKey } from "@/types/message.types";
|
import { FileType, TAttachmentForeignKey } from "@/types/message.types";
|
||||||
|
|
||||||
import { buildURL } from "./URL";
|
import { buildURL } from "./URL";
|
||||||
|
|
||||||
export const MIME_TYPES = {
|
export const MIME_TYPES = {
|
||||||
images: ["image/jpeg", "image/png", "image/gif", "image/webp"],
|
images: ["image/jpeg", "image/png", "image/webp", "image/bmp"],
|
||||||
videos: ["video/mp4", "video/webm", "video/ogg"],
|
videos: [
|
||||||
audios: ["audio/mpeg", "audio/ogg", "audio/wav"],
|
"video/mp4",
|
||||||
|
"video/webm",
|
||||||
|
"video/ogg",
|
||||||
|
"video/quicktime", // common in apple devices
|
||||||
|
"video/x-msvideo", // AVI
|
||||||
|
"video/x-matroska", // MKV
|
||||||
|
],
|
||||||
|
audios: [
|
||||||
|
"audio/mpeg", // MP3
|
||||||
|
"audio/mp3", // Explicit MP3 type
|
||||||
|
"audio/ogg",
|
||||||
|
"audio/wav",
|
||||||
|
"audio/aac", // common in apple devices
|
||||||
|
"audio/x-wav",
|
||||||
|
],
|
||||||
documents: [
|
documents: [
|
||||||
"application/pdf",
|
"application/pdf",
|
||||||
"application/msword",
|
"application/msword", // older ms Word format
|
||||||
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", // newer ms word format
|
||||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
||||||
"application/vnd.ms-excel",
|
"application/vnd.ms-excel", // older excel format
|
||||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", // newer excel format
|
||||||
"application/vnd.ms-powerpoint",
|
"application/vnd.ms-powerpoint",
|
||||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
|
||||||
|
"text/plain",
|
||||||
|
"application/rtf",
|
||||||
|
"application/epub", // do we want to support epub?
|
||||||
|
"application/x-7z-compressed", // do we want to support 7z?
|
||||||
|
"application/zip", // do we want to support zip?
|
||||||
|
"application/x-rar-compressed", // do we want to support winrar?
|
||||||
|
"application/json",
|
||||||
|
"text/csv",
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user