mirror of
https://github.com/documenso/documenso.git
synced 2026-07-14 14:57:12 +10:00
14 lines
499 B
TypeScript
14 lines
499 B
TypeScript
import { env } from '@documenso/lib/utils/env';
|
|
|
|
export const ALLOWED_UPLOAD_MIME_TYPES: Record<string, string[]> = {
|
|
'application/pdf': ['.pdf'],
|
|
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': ['.docx'],
|
|
'image/jpeg': ['.jpg', '.jpeg'],
|
|
'image/png': ['.png'],
|
|
};
|
|
|
|
export const isAllowedMimeType = (mimeType: string): boolean =>
|
|
mimeType in ALLOWED_UPLOAD_MIME_TYPES;
|
|
|
|
export const getGotenbergUrl = (): string | undefined => env('NEXT_PRIVATE_GOTENBERG_URL');
|