oh yeah, codes here https://github.com/hzrd149/blossom-client-sdk?tab=readme-ov-file#handling-broken-images

https://github.com/hzrd149/blossom-client-sdk/blob/master/src/image.ts#L12

Reply to this note

Please Login to reply.

Discussion

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