Files
upload-gltf/lib/constants.ts
T
2026-04-27 11:07:16 +02:00

17 lines
792 B
TypeScript

// ---------------------------------------------------------------------------
// Shared constants — used by both client and server
// ---------------------------------------------------------------------------
export const MODEL_EXTENSIONS = new Set(['.gltf'])
export const TEXTURE_EXTENSIONS = new Set(['.png', '.jpg', '.jpeg', '.webp'])
export const ASSET_EXTENSIONS = new Set(['.bin'])
export const ALL_ALLOWED_EXTENSIONS = new Set([...MODEL_EXTENSIONS, ...TEXTURE_EXTENSIONS, ...ASSET_EXTENSIONS])
/** Extensions tracked by Git LFS (must match .gitattributes) */
export const LFS_EXTENSIONS = new Set(['.gltf', '.bin', '.png', '.jpg', '.jpeg', '.webp'])
export const TMP_DIR = '/tmp/assets'
/** Maximum file size in bytes (100 MB) */
export const MAX_FILE_SIZE = 100 * 1024 * 1024