fix: harden upload resilience and contracts

This commit is contained in:
Tom Boullay
2026-05-12 23:49:30 +02:00
parent 101af23418
commit 606df93b69
19 changed files with 479 additions and 159 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
import { useRef, useState } from 'react'
import type { FolderEntry } from '@/lib/client-types'
import { validateFolder } from '@/lib/validate-folder'
import { getErrorMessage } from '@/lib/guards'
import { FolderIcon } from '@/components/ui/icons'
function buildAssetUrls(model: File, supportFiles: File[]) {
@@ -156,8 +157,8 @@ export default function FolderDropzone({
if (droppedFiles.length === 0) return
await processFiles(droppedFiles)
} catch {
onError('Impossible de lire le dossier depose')
} catch (err) {
onError(`Impossible de lire le dossier depose: ${getErrorMessage(err)}`)
}
}