// Fallback values for use_chat_configuration used when the API request fails. // Keeping a static copy here means an API outage doesn't block attachment // uploads entirely — users retain the behavior they had before the server // was the source of truth. // // The server is authoritative: if these values drift from the server's // ChatConfiguration, the server will still reject uploads that exceed its // own rules. These exist only to give the client something reasonable to // validate against up-front. export const FALLBACK_ALLOWED_FILE_EXTENSIONS = [ '.3ga', '.3gp', '.aac', '.amr', '.avi', '.bmp', '.doc', '.docx', '.gif', '.h263', '.h264', '.heic', '.heif', '.jpeg', '.jpg', '.key', '.m4a', '.m4b', '.m4p', '.m4r', '.m4v', '.mkv', '.mov', '.mp3', '.mp4', '.mp4-latm', '.mpeg', '.mpeg4', '.mpg', '.numbers', '.ogg', '.pages', '.pdf', '.png', '.ppt', '.pptx', '.rtf', '.txt', '.vcf', '.wav', '.webm', '.webp', '.wmv', '.xls', '.xlsx', ] // Broad MIME categories covering the extensions in // FALLBACK_ALLOWED_FILE_EXTENSIONS. Used to constrain native pickers up // front; final accept/reject still uses the extension list because the // picker's `type` filter is advisory on iOS and Android. export const FALLBACK_ALLOWED_MIME_TYPES = [ 'image/*', 'video/*', 'audio/*', 'application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-powerpoint', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/vnd.apple.pages', 'application/vnd.apple.numbers', 'application/vnd.apple.keynote', 'application/rtf', 'text/plain', 'text/rtf', 'text/vcard', ] export const FALLBACK_MAX_FILE_SIZE_IN_BYTES = 50 * 1024 * 1024 export const FALLBACK_MAX_ATTACHMENTS_PER_MESSAGE = 10