{"record":{"id":"3800fea8c938d869","repo":"langflow-ai/langflow","slug":"file-type-fileextension-not-allowed-allowed-ty","errorCode":null,"errorMessage":"File type ${fileExtension} not allowed. Allowed types: ${types?.join(\", \")}","messagePattern":"File type (.+?) not allowed\\. Allowed types: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"src/frontend/src/hooks/files/use-upload-file.ts","lineNumber":66,"sourceCode":"        validFiles = filesToUpload.filter((file) => {\n          const fileExtension = file.name.split(\".\").pop()?.toLowerCase();\n          return fileExtension && types.includes(fileExtension);\n        });\n\n        if (validFiles.length === 0) {\n          throw new Error(\n            `No supported files found in folder. Allowed types: ${types?.join(\", \")}`,\n          );\n        }\n      }\n\n      for (const file of validFiles) {\n        validateFileSize(file);\n        // Check if file extension is allowed (for non-folder selection)\n        if (!webkitdirectory) {\n          const fileExtension = file.name.split(\".\").pop()?.toLowerCase();\n          if (!fileExtension || (types && !types.includes(fileExtension))) {\n            throw new Error(\n              `File type ${fileExtension} not allowed. Allowed types: ${types?.join(\", \")}`,\n            );\n          }\n          if (!multiple && filesToUpload.length !== 1) {\n            throw new Error(\"Multiple files are not allowed\");\n          }\n        }\n\n        const res = await uploadFileMutation({\n          file,\n        });\n\n        if (!webkitdirectory && res?.path) {\n          const existing = getRelativePathForServerPath(res.path);\n          if (existing && existing.includes(\"/\")) {\n            const flatName = String(res.path).split(\"/\").filter(Boolean).pop();\n            setRelativePathForServerPath(\n              res.path,","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/frontend/src/hooks/files/use-upload-file.ts#L48-L84","documentation":"400 returned when the config path resolved for the requested client exists in the schema but its parent directory does not — i.e. that editor has never been installed/started on this machine. The message names the client and asks to install it first.","triggerScenarios":"POST /{project_id}/install with client='claude' on Windows where %APPDATA%\\Claude is absent, or client='cursor' with ~/.cursor never created because Cursor was never run.","commonSituations":"User has Cursor installed but has never opened it (it creates ~/.cursor on first run); installing Claude config on a machine that only has Claude in the browser; wrong user account/home dir in a container.","solutions":["Launch the target editor at least once so it creates its config directory, then retry install.","Verify the expected path exists (e.g. ~/.cursor/mcp.json parent, %APPDATA%/Claude).","If running Langflow in docker, remember /install writes files inside the container — run the install from a Langflow on the same host/user as the editor."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"from pathlib import Path\nconfig_parents = {\"cursor\": Path.home() / \".cursor\", \"claude\": Path.home() / \"Library/Application Support/Claude\"}\nif not config_parents.get(client, Path(\".\")).exists():\n    print(\"Launch the editor once so it creates its config dir, then retry\")","typeGuard":null,"tryCatchPattern":"except httpx.HTTPStatusError as e:\n    if e.response.status_code == 400 and \"not installed\" in e.response.json().get(\"detail\", \"\"):\n        prompt_user_to_launch_editor()","preventionTips":["Open the target editor once before using one-click install.","Run Langflow under the same OS user as the editor so home-dir checks match."],"tags":["mcp","install","http-400","client-install"],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}