What is Nostr?
Anthony Accioly
npub1a6w…0tyc
2025-02-13 10:38:54

Anthony Accioly on Nostr: 💯. If hzrd confirms that this doesn't go against the Blossom specs and fiatjaf is ...

💯. If hzrd confirms that this doesn't go against the Blossom specs and fiatjaf is happy with it, I'm happy to implement a PR against khatru (not a "right now" thing as I'm juggling a lot of things, but as in a soon...ish thing). Thinking about it, we don't even need to change the signature of the LoadBlob callback. Khatru's Blossom server can have a separate setting or built-in callback implementation for redirection.

E.g. (just making stuff up for now):

appendFileExtension := true
redirectType := bl.MovedPermanently
bl.LoadBlob = append(bl.LoadBlob, bl.redirect("https://mycdn.com/something/{sha256}, redirectType, appendFileExtension))

I can probably think of a better API. The main point being, I think this can be done as built-in khatru functionality without the need for breaking changes to the previous API. Then folks will have a way to serve media from a proper CDN.
Author Public Key
npub1a6we08n7zsv2na689whc9hykpq4q6sj3kaauk9c2dm8vj0adlajq7w0tyc