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
+1 -1
View File
@@ -15,7 +15,7 @@ export const dynamic = 'force-dynamic'
// ---------------------------------------------------------------------------
// POST /api/upload/drive
//
// Upload **original** files (no Blender compression) to Nextcloud Drive.
// Upload **original** files to Nextcloud Drive.
//
// JSON body:
// - stagingId
+2 -2
View File
@@ -11,7 +11,7 @@ export const dynamic = 'force-dynamic'
/**
* POST /api/upload/git
* Upload files, compress with Blender, and push to GitHub via Octokit.
* Upload prepared files and push to GitHub via Octokit.
*/
export async function POST(req: NextRequest) {
// --- Auth ---
@@ -42,7 +42,7 @@ export async function POST(req: NextRequest) {
}
try {
// --- Process files (compress model + textures for Git) ---
// --- Process files (preserve model + buffers, compress textures for Git) ---
const {
filesToPush,
modelFilename,
+1 -1
View File
@@ -16,7 +16,7 @@ const jetbrainsMono = JetBrains_Mono({
export const metadata: Metadata = {
title: 'Upload GLTF',
description: 'Interface de depot securise pour fichiers 3D (.glb, .gltf) avec versionnement automatique sur GitHub',
description: 'Interface de depot securise pour fichiers 3D (.gltf) avec versionnement automatique sur GitHub',
}
export default function RootLayout({
+3 -3
View File
@@ -16,10 +16,10 @@ export default function Home() {
<UploadZone />
<footer className="mt-3 text-gray-500 text-xs text-center">
Modeles : <span className="font-mono text-gray-400">.glb</span>
Modeles : <span className="font-mono text-gray-400">.gltf</span>
<span className="mx-2">·</span>
Textures : <span className="font-mono text-gray-400">.png · .jpg · .webp</span>
Assets : <span className="font-mono text-gray-400">.bin · .png · .jpg · .webp</span>
</footer>
</main>
)
}
}