Uh oh!
There was an error while loading. Please reload this page.
fix(file): bun issues with new file creation - #3582
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Adds explicit checks for missing Written by Cursor Bugbot for commit 22fca37. Configure here. |
Greptile SummaryThis PR fixes a Bun runtime incompatibility where type-casting Key changes:
Minor issues found:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant UploadRoute as /api/files/upload
participant WorkspaceRoute as /api/workspaces/[id]/files
participant Storage
Client->>UploadRoute: POST multipart/form-data (file)
UploadRoute->>UploadRoute: formData.getAll('file')
UploadRoute->>UploadRoute: filter(f => f instanceof File) [NEW]
alt No File instances remain
UploadRoute-->>Client: 400 No files provided
else Valid File(s) present
UploadRoute->>UploadRoute: check file.name non-empty [NEW]
UploadRoute->>UploadRoute: validateFileExtension(name)
UploadRoute->>Storage: upload buffer
UploadRoute-->>Client: 200 upload result
end
Client->>WorkspaceRoute: POST multipart/form-data (file)
WorkspaceRoute->>WorkspaceRoute: formData.get('file')
WorkspaceRoute->>WorkspaceRoute: instanceof File check [NEW]
alt Not a File instance
WorkspaceRoute-->>Client: 400 No file provided
else Valid File
WorkspaceRoute->>WorkspaceRoute: check fileName non-empty [NEW]
WorkspaceRoute->>WorkspaceRoute: check size ≤ 100MB
WorkspaceRoute->>Storage: uploadWorkspaceFile(buffer)
WorkspaceRoute-->>Client: 200 success
end
Last reviewed commit: f706eb5 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
icecrasher321
commented
Mar 14, 2026
bugbot run |
Uh oh!
There was an error while loading. Please reload this page.
* fix(files): new file bun error * update constant * fix types
Summary
JS core error on file type assertion
Type of Change
Testing
Tested manually
Checklist