Skip to content
This repository was archived by the owner on Jan 24, 2026. It is now read-only.

@aaccioly blossom updates#59

Merged
fiatjaf merged 2 commits into
fiatjaf:masterfrom
aaccioly-open-source:feat/khatru-blossom-updates
Sep 8, 2025
Merged

@aaccioly blossom updates#59
fiatjaf merged 2 commits into
fiatjaf:masterfrom
aaccioly-open-source:feat/khatru-blossom-updates

Conversation

@fiatjaf

@fiatjaf fiatjaf commented Sep 5, 2025

Copy link
Copy Markdown
Owner

No description provided.

This enhancement allows hooks to make extension-aware decisions for storage,
loading, and access control operations. The extension is intelligently derived
from MIME type detection, file magic bytes, or URL parsing.

Additionally improves MIME type handling by providing fallback to
"application/octet-stream" when extension-based detection fails as per
BUD-01.

BREAKING CHANGE: All Blossom hook functions now require an additional `ext` parameter:
- StoreBlob hooks now accept (ctx, sha256, ext, body) instead of (ctx, sha256, body)
- LoadBlob hooks now accept (ctx, sha256, ext) instead of (ctx, sha256)
- DeleteBlob hooks now accept (ctx, sha256, ext) instead of (ctx, sha256)
- RejectGet hooks now accept (ctx, auth, sha256, ext) instead of (ctx, auth, sha256)
- RejectDelete hooks now accept (ctx, auth, sha256, ext) instead of (ctx, auth, sha256)
Refine extension derivation logic by ensuring `bd` is not nil before
accessing its type.
@fiatjaf
fiatjaf merged commit 668c41b into fiatjaf:master Sep 8, 2025
1 check passed
@fiatjaf

fiatjaf commented Sep 8, 2025

Copy link
Copy Markdown
Owner Author

Sorry for the confusion, thank you for the contribution.

1l0 pushed a commit to nosuta/nostr that referenced this pull request Sep 19, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants