7 Commits

Author SHA1 Message Date
Anthony Accioly
3c802caff5 feat(blossom)!: add file extension parameter to Blossom hooks
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)
2025-09-08 16:06:24 -03:00
fiatjaf
51632dcc9f update blossom example to use a different database.
closes https://github.com/fiatjaf/khatru/issues/36
2025-03-17 13:36:41 -03:00
fiatjaf
433cceea86 include the ReplaceEvent setup on all examples. 2025-01-13 16:47:21 -03:00
Anthony Accioly
7bfdbb557c fix(blossom): use io.ReadSeeker in Blossom example
This should fix the failing pipeline test
2024-11-22 07:54:57 -03:00
Anthony Accioly
a004f59187 fix(blossom): Example returns io.Reader 2024-11-04 13:56:13 +00:00
fiatjaf
a893dc2d2c blossom: store as a standalone interface (and an eventstore wrapper). 2024-10-29 09:01:04 -03:00
fiatjaf
91e7737ec1 basic modular blossom support. 2024-10-27 17:20:10 -03:00