diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx index 0ea79c7dd..23fb25e2f 100644 --- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx +++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx @@ -462,7 +462,6 @@ export default function ParameterComponent({ value={data.node?.template[name].value ?? ""} onChange={handleOnNewValue} fileTypes={data.node?.template[name].fileTypes} - suffixes={data.node?.template[name].suffixes} onFileChange={(filePath: string) => { data.node!.template[name].file_path = filePath; }} diff --git a/src/frontend/src/components/codeTabsComponent/index.tsx b/src/frontend/src/components/codeTabsComponent/index.tsx index 5fcf66d0c..2ff5bd591 100644 --- a/src/frontend/src/components/codeTabsComponent/index.tsx +++ b/src/frontend/src/components/codeTabsComponent/index.tsx @@ -444,11 +444,6 @@ export default function CodeTabsComponent({ templateField ].fileTypes } - suffixes={ - node.data.node.template[ - templateField - ].suffixes - } onFileChange={( value: any ) => { diff --git a/src/frontend/src/components/inputFileComponent/index.tsx b/src/frontend/src/components/inputFileComponent/index.tsx index 155351d9a..3c8a5fa76 100644 --- a/src/frontend/src/components/inputFileComponent/index.tsx +++ b/src/frontend/src/components/inputFileComponent/index.tsx @@ -9,7 +9,6 @@ export default function InputFileComponent({ value, onChange, disabled, - suffixes, fileTypes, onFileChange, editNode = false, @@ -41,8 +40,8 @@ export default function InputFileComponent({ }, [disabled, onChange]); function checkFileType(fileName: string): boolean { - for (let index = 0; index < suffixes.length; index++) { - if (fileName.endsWith(suffixes[index])) { + for (let index = 0; index < fileTypes.length; index++) { + if (fileName.endsWith(fileTypes[index])) { return true; } } @@ -57,7 +56,7 @@ export default function InputFileComponent({ // Create a file input element const input = document.createElement("input"); input.type = "file"; - input.accept = suffixes.join(","); + input.accept = fileTypes.join(","); input.style.display = "none"; // Hidden from view input.multiple = false; // Allow only one file selection diff --git a/src/frontend/src/modals/EditNodeModal/index.tsx b/src/frontend/src/modals/EditNodeModal/index.tsx index 7c367c427..a571b51cd 100644 --- a/src/frontend/src/modals/EditNodeModal/index.tsx +++ b/src/frontend/src/modals/EditNodeModal/index.tsx @@ -380,10 +380,6 @@ const EditNodeModal = forwardRef( myData.node.template[templateParam] .fileTypes } - suffixes={ - myData.node.template[templateParam] - .suffixes - } onFileChange={(filePath: string) => { data.node!.template[ templateParam diff --git a/src/frontend/src/types/components/index.ts b/src/frontend/src/types/components/index.ts index 028be352d..e69d52f54 100644 --- a/src/frontend/src/types/components/index.ts +++ b/src/frontend/src/types/components/index.ts @@ -119,7 +119,6 @@ export type FileComponentType = { disabled: boolean; onChange: (value: string[] | string) => void; value: string; - suffixes: Array; fileTypes: Array; onFileChange: (value: string) => void; editNode?: boolean;