Skip to content

[WIP] Fix upload endpoint to stream files directly to disk#34

Merged
unrealandychan merged 1 commit intomainfrom
copilot/fix-upload-endpoint-memory-issue
Apr 11, 2026
Merged

[WIP] Fix upload endpoint to stream files directly to disk#34
unrealandychan merged 1 commit intomainfrom
copilot/fix-upload-endpoint-memory-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 11, 2026

  • Replace Buffer.from(await file.arrayBuffer()) + writeFile with streaming via Readable.fromWeb + pipeline + createWriteStream in app/api/upload-chart/route.ts
  • Update imports accordingly (remove writeFile, add createWriteStream, pipeline, Readable)
  • Validate with lint/build

Copilot AI linked an issue Apr 11, 2026 that may be closed by this pull request
@unrealandychan unrealandychan marked this pull request as ready for review April 11, 2026 06:48
Copilot AI review requested due to automatic review settings April 11, 2026 06:48
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@unrealandychan unrealandychan merged commit d228cb3 into main Apr 11, 2026
1 of 2 checks passed
Copilot AI requested a review from unrealandychan April 11, 2026 06:48
Copilot stopped work on behalf of unrealandychan due to an error April 11, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Upload endpoint buffers entire file in memory before writing to disk

3 participants