-
![](https://image.nostr.build/46748cf4fa614b75109ead7b70927e1ab8ea686fd3af03a12027e3414b9fe572.jpg)
@ Anthony Accioly
2025-02-13 10:38:54
💯. 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.