Conversation
…om file requests - Increase visitor file size limit from 30MB to 350MB to match paid admin limits (file requests are only available on Data Rooms Plus plan) - Expand VIEWER_ACCEPTED_FILE_TYPES to include all admin file types except audio and video: adds PowerPoint, Keynote, ODP, ODT, RTF, TXT, Markdown, CAD (DWG/DXF), ZIP, TSV, XLSM, KML/KMZ, and Outlook MSG - Update UI help text to reflect broader file type support Co-authored-by: Marc Seitz <mfts@users.noreply.github.com>
Co-authored-by: Marc Seitz <mfts@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe PR expands supported file types for document uploads by increasing the maximum file size limit to 350 MB, updating UI messaging, removing specialized handling for CAD and map files, and adding MIME type entries for Office documents, presentations, plain text, RTF, and archives. Changes
Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@components/viewer-upload-zone.tsx`:
- Line 26: The client-side PDF page counting in ViewerUploadZone (where
file.arrayBuffer() and getPagesCount are called) can OOM for large files; add a
size gate (e.g., const MAX_CLIENT_PDF_PAGECOUNT_MB = 50) and only call
file.arrayBuffer() + getPagesCount when file.type === "application/pdf" &&
file.size <= MAX_CLIENT_PDF_PAGECOUNT_MB * 1024 * 1024, otherwise set numPages =
1 (or defer counting to the server); update the logic around the existing
file.arrayBuffer()/getPagesCount usage to use this guard to prevent buffering
>50MB PDFs in the browser.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f28513f3-eb90-4a76-b42e-4c408c8d6749
📒 Files selected for processing (3)
components/viewer-upload-component.tsxcomponents/viewer-upload-zone.tsxlib/constants.ts
| viewerData, | ||
| teamId, | ||
| maxFileSize = 30, // 30 MB default | ||
| maxFileSize = 350, // 350 MB default, matches paid admin document limits |
There was a problem hiding this comment.
Avoid client-side page counting on 350 MB PDFs.
With the new default, the existing PDF path on Lines 79-81 now buffers the entire file via file.arrayBuffer() before upload. A 300+ MB PDF is enough to freeze or crash the tab on lower-memory devices. Please gate client-side page counting behind a much smaller threshold or move it server-side.
Possible direction
const MAX_CLIENT_PDF_PAGECOUNT_MB = 50;
let numPages = 1;
if (
file.type === "application/pdf" &&
file.size <= MAX_CLIENT_PDF_PAGECOUNT_MB * 1024 * 1024
) {
const buffer = await file.arrayBuffer();
numPages = await getPagesCount(buffer);
}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@components/viewer-upload-zone.tsx` at line 26, The client-side PDF page
counting in ViewerUploadZone (where file.arrayBuffer() and getPagesCount are
called) can OOM for large files; add a size gate (e.g., const
MAX_CLIENT_PDF_PAGECOUNT_MB = 50) and only call file.arrayBuffer() +
getPagesCount when file.type === "application/pdf" && file.size <=
MAX_CLIENT_PDF_PAGECOUNT_MB * 1024 * 1024, otherwise set numPages = 1 (or defer
counting to the server); update the logic around the existing
file.arrayBuffer()/getPagesCount usage to use this guard to prevent buffering
>50MB PDFs in the browser.
Increase data room visitor file upload size limit and expand accepted file types.
Data room visitors with file requests enabled on Data Rooms Plus plans now have a file size limit of 350MB (matching admin limits) and can upload a broader range of file types, excluding audio, video, CAD, geo, and markdown files. This enhances the visitor experience by providing more flexibility for file submissions.
Summary by CodeRabbit
New Features
Chores