{"record":{"id":"af4dd8ed932acdbb","repo":"toeverything/AFFiNE","slug":"this-import-contains-a-nested-zip-please-import-i","errorCode":null,"errorMessage":"This import contains a nested zip. Please import it in the desktop client.","messagePattern":"This import contains a nested zip\\. Please import it in the desktop client\\.","errorType":"exception","errorClass":"WebImportLimitError","httpStatus":null,"severity":"error","filePath":"packages/frontend/core/src/desktop/dialogs/import/web-limits.ts","lineNumber":60,"sourceCode":"    isWebImportDocument(entry.name)\n  ).length;\n  if (documentCount > limits.maxDocumentCount) {\n    throw new WebImportLimitError(\n      'This import has too many documents for the web app. Please import it in the desktop client.'\n    );\n  }\n\n  for (const entry of entries) {\n    if (entry.uncompressedSize > limits.maxEntryBytes) {\n      throw new WebImportLimitError(\n        'This import contains a file that is too large for the web app. Please import it in the desktop client.'\n      );\n    }\n    if (\n      limits.maxNestedZipDepth === 0 &&\n      entry.name.toLowerCase().endsWith('.zip')\n    ) {\n      throw new WebImportLimitError(\n        'This import contains a nested zip. Please import it in the desktop client.'\n      );\n    }\n  }\n}\n\nexport async function preflightWebFilesImport(\n  files: File[],\n  limits = webImportLimits\n) {\n  const totalBytes = files.reduce((total, file) => total + file.size, 0);\n  if (totalBytes > limits.maxTotalBytes) {\n    throw new WebImportLimitError(\n      'This import is too large for the web app. Please import it in the desktop client.'\n    );\n  }\n  if (files.length > limits.maxEntryCount) {\n    throw new WebImportLimitError(","sourceCodeStart":42,"sourceCodeEnd":78,"githubUrl":"https://github.com/toeverything/AFFiNE/blob/b4c8548c09da21b2898443559a5b846f0ccf5dd8/packages/frontend/core/src/desktop/dialogs/import/web-limits.ts#L42-L78","documentation":"WebImportLimitError thrown in preflightWebZipImport when an entry is a .zip and nested zips are disallowed (maxNestedZipDepth 0). The web importer cannot recurse into nested archives; desktop is required.","triggerScenarios":"Thrown by preflightWebZipImport or preflightWebFilesImport when an entry name ends with .zip while maxNestedZipDepth is 0, i.e. a zip inside the import is not allowed on web.","commonSituations":"Happens when the import bundle itself contains zip files. Extract them first or import the bundle in the desktop client.","solutions":["Extract the nested zip first, then import the inner archive.","Use the desktop client which supports nested archives."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b4c8548c09da21b2898443559a5b846f0ccf5dd8","analyzedAt":"2026-08-18T21:16:52.546Z","contentChangedAt":"2026-08-18T21:16:52.546Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}