diff --git a/frontend/packages/core/src/pages/x2paddle.tsx b/frontend/packages/core/src/pages/x2paddle.tsx index 69d6adcaff80622b3492bd319e843448d9624939..b0a5b6ac9eee6fabfc7098eee517e6296d6f3b7c 100644 --- a/frontend/packages/core/src/pages/x2paddle.tsx +++ b/frontend/packages/core/src/pages/x2paddle.tsx @@ -177,7 +177,7 @@ function App() { console.log('Graph.current.filess', Graph); const Graphs: any = Graph; const files: FileList | null = Graphs?.current?.files as FileList; - const name = files[0].name.split('.')[1]; + const name = files[0].name.substring(files[0].name.lastIndexOf('.') + 1); if (name === 'prototxt') { toast.warning(t('togglegraph:warin-info')); if (file.current) {