langflow-ai/langflow · warning · Error
Too many files detected (${droppedFiles.length}). This likel
Error message
Too many files detected (${droppedFiles.length}). This likely includes large/hidden directories. Please drop a smaller folder or exclude folders like node_modules. What it means
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.
Source
Thrown at src/frontend/src/modals/fileManagerModal/components/dragFilesComponent/index.tsx:143
const deduped = dedupeFolderRootIfNeeded({
files: typeFiltered,
existingRoots: new Set([
...Array.from(existingFolderRoots),
...Array.from(sessionUsedFolderRootsRef.current),
]),
renameOnCollision: true,
});
const finalRootName = deduped.renamedRootName ?? deduped.rootName;
if (finalRootName) {
sessionUsedFolderRootsRef.current.add(finalRootName);
}
droppedFiles = deduped.files;
}
if (shouldTreatAsFolder && droppedFiles.length > 1000) {
throw new Error(
`Too many files detected (${droppedFiles.length}). This likely includes large/hidden directories. Please drop a smaller folder or exclude folders like node_modules.`,
);
}
const filesIds = shouldTreatAsFolder
? await uploadFolder({ files: droppedFiles })
: await uploadFiles({ files: droppedFiles });
if (filesIds.length > 0) {
onUpload(filesIds);
setSuccessData({
title:
filesIds.length > 1
? t("fileManager.filesUploadedSuccessfully")
: t("fileManager.fileUploadedSuccessfully"),
});
}
// biome-ignore lint/suspicious/noExplicitAny: legacy
} catch (error: any) {View on GitHub (pinned to 976ec789d2)
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
Defensive patterns
Strategy: validation
Validate before calling
const MAX_DROP = 1000;
if (shouldTreatAsFolder && droppedFiles.length > MAX_DROP) {
notify(`Folder has ${droppedFiles.length} files (max ${MAX_DROP}); exclude node_modules/.git`);
return; // don't call upload at all
} Try / catch
try { await handleDrop(e); }
catch (err) {
if (err instanceof Error && err.message.startsWith("Too many files detected")) {
showFolderSizeHint(); // guide user to a smaller folder
} else throw err;
} Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- errors.tooManyFiles
- The file size is too large. Please select a file smaller tha
- Invalid flow data
- Deployment name is required
- Flow not found
AI-assisted analysis of langflow-ai/langflow@976ec789d2 (2026-08-14).
Data as JSON: /api/errors/199632ae64018be3.
Report an issue: GitHub.