Co-authored-by: Reifonas <211114984+Reifonas@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-05-14 11:58:27 +00:00
parent 566b425002
commit 04f7b1639c
-22
View File
@@ -8,28 +8,6 @@ import { getSupportedExtension, convertToGLB, ACCEPTED_EXTENSIONS } from '@/lib/
import { convertIFCtoGLB } from '@/lib/convertIFC'; import { convertIFCtoGLB } from '@/lib/convertIFC';
import { CloudLoader } from '@/components/CloudLoader'; import { CloudLoader } from '@/components/CloudLoader';
/**
* Normaliza URLs comuns para apontar ao binário direto.
* - Dropbox: força dl=1
* - OneDrive (1drv.ms / onedrive.live.com): força download=1
*/
function normalizeCloudUrl(input: string): string {
try {
const u = new URL(input);
if (/(^|\.)dropbox\.com$/.test(u.hostname)) {
u.searchParams.set('dl', '1');
return u.toString();
}
if (/(^|\.)1drv\.ms$|onedrive\.live\.com$/.test(u.hostname)) {
u.searchParams.set('download', '1');
return u.toString();
}
return input;
} catch {
return input;
}
}
const Index = () => { const Index = () => {
const navigate = useNavigate(); const navigate = useNavigate();
const fileInputRef = useRef<HTMLInputElement>(null); const fileInputRef = useRef<HTMLInputElement>(null);