toeverything/AFFiNE · error · WebImportLimitError
This import is too large for the web app. Please import it i
Error message
This import is too large for the web app. Please import it in the desktop client.
What it means
WebImportLimitError from preflightWebZipImport when the zip file's total byte size exceeds maxTotalBytes. A preflight guard that rejects oversized imports in the browser, directing the user to the desktop client.
Source
Thrown at packages/frontend/core/src/desktop/dialogs/import/web-limits.ts:29
maxEntryBytes: 8 * 1024 * 1024,
maxEntryCount: 1000,
maxNestedZipDepth: 0,
maxDocumentCount: 250,
};
export class WebImportLimitError extends Error {
constructor(message: string) {
super(message);
this.name = 'WebImportLimitError';
}
}
export async function preflightWebZipImport(
file: File,
limits = webImportLimits
) {
if (file.size > limits.maxTotalBytes) {
throw new WebImportLimitError(
'This import is too large for the web app. Please import it in the desktop client.'
);
}
const entries = readZipDirectory(new Uint8Array(await file.arrayBuffer()));
if (entries.length > limits.maxEntryCount) {
throw new WebImportLimitError(
'This import has too many files for the web app. Please import it in the desktop client.'
);
}
const documentCount = entries.filter(entry =>
isWebImportDocument(entry.name)
).length;
if (documentCount > limits.maxDocumentCount) {
throw new WebImportLimitError(
'This import has too many documents for the web app. Please import it in the desktop client.'
);View on GitHub (pinned to b4c8548c09)
Solutions
- Run the import in the AFFiNE desktop client instead of the web app.
- Split the import into smaller archives.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown by preflightWebZipImport or preflightWebFilesImport when the total import size exceeds webImportLimits.maxTotalBytes (32 MiB).
Common situations: Users hit this importing a large zip or folder in the web app. Split the import or use the desktop client, which has no such cap.
AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18).
Data as JSON: /api/errors/613429b66ebf9618.
Report an issue: GitHub.