Skip to content

Conversation

@BYK
Copy link
Member

@BYK BYK commented Jan 8, 2026

Problem

The refactoring in #1237 accidentally broke download links for text-based attachments (txt, csv, json, code files) by returning undefined instead of creating a blob URL.

Solution

Restore the original behavior where all content types get a blob URL for downloading. The else branch now creates a blob from the raw attachment string instead of returning undefined.

Testing

All 172 tests pass.

@BYK BYK deployed to Preview January 8, 2026 21:29 — with GitHub Actions Active
@vercel
Copy link

vercel bot commented Jan 8, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Review Updated (UTC)
spotlightjs Skipped Skipped Jan 8, 2026 9:35pm

The refactoring in #1237 accidentally broke download links for text-based
attachments (txt, csv, json, code files) by returning undefined instead
of creating a blob URL. This restores the original behavior where all
content types get a blob URL for downloading.

Also adds comprehensive unit tests for the Attachment component to prevent
future regressions:
- Download URL generation for various content types
- Error handling for invalid base64 data
- Content preview rendering
- Blob URL cleanup on unmount
@BYK BYK force-pushed the fix/attachment-text-download branch from 51e677f to 3b4c987 Compare January 8, 2026 21:34
@BYK BYK deployed to Preview January 8, 2026 21:35 — with GitHub Actions Active
@BYK BYK merged commit 66f6b90 into main Jan 8, 2026
20 checks passed
@BYK BYK deleted the fix/attachment-text-download branch January 8, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants