{"record":{"id":"199632ae64018be3","repo":"langflow-ai/langflow","slug":"too-many-files-detected-droppedfiles-length","errorCode":null,"errorMessage":"Too many files detected (${droppedFiles.length}). This likely includes large/hidden directories. Please drop a smaller folder or exclude folders like node_modules.","messagePattern":"Too many files detected \\((.+?)\\)\\. This likely includes large/hidden directories\\. Please drop a smaller folder or exclude folders like node_modules\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"src/frontend/src/modals/fileManagerModal/components/dragFilesComponent/index.tsx","lineNumber":143,"sourceCode":"          const deduped = dedupeFolderRootIfNeeded({\n            files: typeFiltered,\n            existingRoots: new Set([\n              ...Array.from(existingFolderRoots),\n              ...Array.from(sessionUsedFolderRootsRef.current),\n            ]),\n            renameOnCollision: true,\n          });\n\n          const finalRootName = deduped.renamedRootName ?? deduped.rootName;\n          if (finalRootName) {\n            sessionUsedFolderRootsRef.current.add(finalRootName);\n          }\n\n          droppedFiles = deduped.files;\n        }\n\n        if (shouldTreatAsFolder && droppedFiles.length > 1000) {\n          throw new Error(\n            `Too many files detected (${droppedFiles.length}). This likely includes large/hidden directories. Please drop a smaller folder or exclude folders like node_modules.`,\n          );\n        }\n\n        const filesIds = shouldTreatAsFolder\n          ? await uploadFolder({ files: droppedFiles })\n          : await uploadFiles({ files: droppedFiles });\n        if (filesIds.length > 0) {\n          onUpload(filesIds);\n          setSuccessData({\n            title:\n              filesIds.length > 1\n                ? t(\"fileManager.filesUploadedSuccessfully\")\n                : t(\"fileManager.fileUploadedSuccessfully\"),\n          });\n        }\n        // biome-ignore lint/suspicious/noExplicitAny: legacy\n      } catch (error: any) {","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/langflow-ai/langflow/blob/976ec789d2886a86de109c044d089d68e96c9a35/src/frontend/src/modals/fileManagerModal/components/dragFilesComponent/index.tsx#L125-L161","documentation":"Thrown by the drag-drop handler in the file manager modal when a dropped folder expands to more than 1000 files. This is a deliberate client-side guard: browsers hand drop-events every file (including node_modules/.git contents), and uploading thousands of files would flood the API, so the operation aborts before uploadFolder is called.","triggerScenarios":"Dragging a project directory onto the file drop zone where the DataTransfer items list exceeds 1000 entries — typically because node_modules, .git, venv, or dist folders are included in the drag.","commonSituations":"Dropping an entire cloned repo or app folder instead of a data folder; dropping a folder that contains dependency caches; machines where hidden directories are included in drag data.","solutions":["Drop only the subfolder that holds the actual data files, excluding node_modules/.git/dist","Zip-select: move the needed files into a clean folder and drop that","Use the folder picker button instead — it applies hidden-file filtering before the count check","If genuinely needed, split the folder into batches under 1000 files each"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const MAX_DROP = 1000;\nif (shouldTreatAsFolder && droppedFiles.length > MAX_DROP) {\n  notify(`Folder has ${droppedFiles.length} files (max ${MAX_DROP}); exclude node_modules/.git`);\n  return; // don't call upload at all\n}","typeGuard":null,"tryCatchPattern":"try { await handleDrop(e); }\ncatch (err) {\n  if (err instanceof Error && err.message.startsWith(\"Too many files detected\")) {\n    showFolderSizeHint(); // guide user to a smaller folder\n  } else throw err;\n}","preventionTips":["Drop only data subfolders, never project roots containing node_modules/.git","Prefer the folder picker button, which filters hidden/ignored entries","Split large folders into batches under 1000 files"],"tags":["frontend","file-upload","drag-and-drop","limit","file-manager"],"backgroundTag":null,"analyzedSha":"976ec789d2886a86de109c044d089d68e96c9a35","analyzedAt":"2026-08-14T18:23:12.227Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}