fix(cli): allow generic file uploads through buzz messages send --file - #4753
Open
TechPrieto wants to merge 1 commit into
Open
fix(cli): allow generic file uploads through buzz messages send --file#4753TechPrieto wants to merge 1 commit into
TechPrieto wants to merge 1 commit into
Conversation
2 tasks
buzz-cli's upload_file() rejected any MIME type outside a narrow image/video allowlist before the file ever reached the relay. The relay's /upload endpoint already routes non-image/video bytes through buzz_media::process_file_upload — a generic-file path with its own magic-byte sniffing, size cap, and deny-list for active-content/ executable types (buzz-media/src/validation.rs) — so the CLI's stricter local check was purely redundant and blocked legitimate attachments (docs, text, PDFs) that the server already supports. Replace the local allowlist with a deny-list mirroring the relay's BLOCKED_FILE_MIME_TYPES; anything else now uploads and lets the relay be the authoritative validator, as designed. Also fixes the markdown embed for non-image/video uploads: they were rendered as broken `` embeds. Desktop's resolveFileCard renderer expects a markdown *link* (`[filename](url)`) plus the imeta MIME to show a generic-file download card, so route those through a `[filename](url)` link using the original filename (Blossom URLs are content-hash-addressed, not human-readable). Reported by Abraham in #buzz-ops 2026-08-04: Antigravity shared a `file:///home/...` artifact link that only resolved on the VPS, not from a remote Desktop client — this closes the underlying gap that made pasting file:// paths the only option.
TechPrieto
force-pushed
the
fix/cli-generic-file-upload
branch
from
August 5, 2026 03:40
ba85951 to
2f1e924
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
buzz-cli'supload_file()rejected any MIME type outside a narrow image/video allowlist before the file ever reached the relay. The relay's/uploadendpoint already routes non-image/video bytes throughbuzz_media::process_file_upload— a generic-file path with its own magic-byte sniffing, size cap, and deny-list for active-content/executable types (buzz-media/src/validation.rs) — so the CLI's stricter local check was purely redundant and blocked legitimate attachments (docs, text, PDFs, archives) that the server already supports.BLOCKED_FILE_MIME_TYPES; anything else now uploads and lets the relay be the authoritative validator, as already happens for images.embeds. Desktop'sresolveFileCardrenderer expects a markdown link ([filename](url)) plus the imeta MIME to show a generic-file download card, so route those through a[filename](url)link using the original filename (Blossom URLs are content-hash-addressed, not human-readable).Test plan
cargo test -p buzz-cli— 321/321 passing, including 4 new unit tests for the markdown formatting helper.txtand a.zipviabuzz upload fileandbuzz messages send --file, confirmed the resulting message renders a working generic-file download link🤖 Generated with Claude Code