Changes
Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com>
This commit is contained in:
+1
-4
@@ -45,18 +45,15 @@ const Index = () => {
|
||||
}
|
||||
|
||||
if (ext === 'glb') {
|
||||
// Para GLB, valida a assinatura antes de criar o objectURL
|
||||
// Para GLB, valida assinatura "glTF" antes de criar o objectURL
|
||||
try {
|
||||
const head = await file.slice(0, 16).arrayBuffer();
|
||||
const headBuf = new ArrayBuffer(file.size);
|
||||
// Para validar assinatura precisamos só do header — slice já basta
|
||||
const sigCheck = validateModelFile(file.name, file.size, ext, head);
|
||||
if (!sigCheck.ok) {
|
||||
toast.error(sigCheck.reason!);
|
||||
if (sigCheck.detail) console.warn('[validateModelFile]', sigCheck.detail);
|
||||
return;
|
||||
}
|
||||
void headBuf;
|
||||
} catch (err) {
|
||||
console.error('[upload] header read failed', err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user