toeverything/AFFiNE · error · WebImportLimitError

This import contains a file that is too large for the web ap

Error message

This import contains a file that is too large for the web app. Please import it in the desktop client.

What it means

WebImportLimitError thrown during the per-entry loop of preflightWebZipImport when any single entry's uncompressed size exceeds maxEntryBytes. Preflight guard against individual oversized files in the web app.

Source

Thrown at packages/frontend/core/src/desktop/dialogs/import/web-limits.ts:52

  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.'
    );
  }

  for (const entry of entries) {
    if (entry.uncompressedSize > limits.maxEntryBytes) {
      throw new WebImportLimitError(
        'This import contains a file that is too large for the web app. Please import it in the desktop client.'
      );
    }
    if (
      limits.maxNestedZipDepth === 0 &&
      entry.name.toLowerCase().endsWith('.zip')
    ) {
      throw new WebImportLimitError(
        'This import contains a nested zip. Please import it in the desktop client.'
      );
    }
  }
}

export async function preflightWebFilesImport(
  files: File[],
  limits = webImportLimits
) {

View on GitHub (pinned to b4c8548c09)

Solutions

  1. Import via the desktop client.
  2. Remove or compress the oversized file inside the archive.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown by preflightWebZipImport or preflightWebFilesImport when any single entry's size exceeds webImportLimits.maxEntryBytes (8 MiB).

Common situations: Occurs when one file in the import is larger than 8 MiB. Shrink or remove that file, or import in the desktop client.


AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18). Data as JSON: /api/errors/8f03270a40c8fff9. Report an issue: GitHub.