2024-02-16 11:19:14 +00:00
|
|
|
import { UploadFileType } from "@model/questionTypes/file";
|
|
|
|
|
2024-02-17 00:14:28 +00:00
|
|
|
export const MAX_FILE_SIZE = 419430400;
|
2024-02-16 11:19:14 +00:00
|
|
|
|
|
|
|
export const UPLOAD_FILE_DESCRIPTIONS_MAP = {
|
2024-05-31 16:41:18 +00:00
|
|
|
picture: {
|
2025-04-20 15:16:22 +00:00
|
|
|
title: "Add image",
|
|
|
|
description: "Accepts images",
|
2024-05-31 16:41:18 +00:00
|
|
|
},
|
|
|
|
video: {
|
2025-04-20 15:16:22 +00:00
|
|
|
title: "Add video",
|
|
|
|
description: "Accepts .mp4 and .mov format - maximum 50mb",
|
2024-05-31 16:41:18 +00:00
|
|
|
},
|
2025-04-20 15:16:22 +00:00
|
|
|
audio: { title: "Add audio file", description: "Accepts audio files" },
|
|
|
|
document: { title: "Add document", description: "Accepts documents" },
|
2024-05-31 16:41:18 +00:00
|
|
|
} as const satisfies Record<UploadFileType, { title: string; description: string }>;
|
2024-02-16 11:19:14 +00:00
|
|
|
|
|
|
|
export const ACCEPT_SEND_FILE_TYPES_MAP = {
|
2024-05-31 16:41:18 +00:00
|
|
|
picture: [".jpeg", ".jpg", ".png", ".ico", ".gif", ".tiff", ".webp", ".eps", ".svg"],
|
|
|
|
video: [".mp4", ".mov", ".wmv", ".avi", ".avchd", ".flv", ".f4v", ".swf", ".mkv", ".webm", ".mpeg-2"],
|
|
|
|
audio: [".aac", ".aiff", ".dsd", ".flac", ".mp3", ".mqa", ".ogg", ".wav", ".wma"],
|
|
|
|
document: [".doc", ".docx", ".dotx", ".rtf", ".odt", ".pdf", ".txt", ".xls", ".ppt", ".xlsx", ".pptx", ".pages"],
|
2024-02-16 11:19:14 +00:00
|
|
|
} as const;
|