toeverything/AFFiNE · error · WebImportLimitError

This import has too many files for the web app. Please impor

Error message

This import has too many files for the web app. Please import it in the desktop client.

What it means

preflightWebZipImport enforces web-only import limits; when the zip's entry count exceeds limits.maxEntryCount it throws WebImportLimitError advising the desktop client. (Larger total size triggers a sibling message from the same function.)

Source

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

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

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

View on GitHub (pinned to b4c8548c09)

Solutions

  1. Import using the desktop client which has no file-count limit.
  2. Reduce the number of files in the archive.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown by preflightWebZipImport or preflightWebFilesImport when the entry/file count exceeds webImportLimits.maxEntryCount (1000).

Common situations: Occurs with archives or folders containing more than 1000 files. Reduce the file count or import via the desktop client.


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