Here is the code that gets all the "imeta" blobs and any blossom compatible URLs in the content

https://github.com/hzrd149/nostrudel/blob/master/src/components/note/timeline-note/components/share-modal.tsx#L46-L57

and here is the code that sends off the /mirror requests https://github.com/hzrd149/nostrudel/blob/master/src/components/note/timeline-note/components/share-modal.tsx#L63-L96

Reply to this note

Please Login to reply.

Discussion

That's great but I'm asking if when displaying blossom media and the URL is broken do the links "self heal"?

Awesome! Thank you!

Would this also work for any file/blob (not just media)?

The code is written for HTML image elements, but it wouldn't be hard at all to convert it to a simple "download" script that would try to download a certain blob from a list of servers

I built something similar here https://github.com/hzrd149/nostrudel/blob/master/src/views/files/components/download-button.tsx#L28-L75