fix: support gltf uploads with local preview

This commit is contained in:
Tom Boullay
2026-04-27 11:07:16 +02:00
parent 078e687e86
commit 4c3a687ff8
19 changed files with 136 additions and 98 deletions
+4 -3
View File
@@ -2,12 +2,13 @@
// Shared constants — used by both client and server
// ---------------------------------------------------------------------------
export const MODEL_EXTENSIONS = new Set(['.glb', '.gltf'])
export const MODEL_EXTENSIONS = new Set(['.gltf'])
export const TEXTURE_EXTENSIONS = new Set(['.png', '.jpg', '.jpeg', '.webp'])
export const ALL_ALLOWED_EXTENSIONS = new Set([...MODEL_EXTENSIONS, ...TEXTURE_EXTENSIONS])
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(['.glb', '.gltf', '.png', '.jpg', '.jpeg', '.webp'])
export const LFS_EXTENSIONS = new Set(['.gltf', '.bin', '.png', '.jpg', '.jpeg', '.webp'])
export const TMP_DIR = '/tmp/assets'