fix: support gltf uploads with local preview
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
@@ -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
@@ -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>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user