Do you also detect blossom links and find the file elsewhere if it's no longer there? Want to do this for chachi and was wondering if I could yoink the code from somewhere.
Added a pretty small but cool feature to noStrudel. when you share a note there is an option to mirror the media to your blossom servers so you effectively take ownership of it. should help even more with the censorship resistants
https://cdn.hzrd149.com/43ccec6de8a87eda68e5b2d9689cee2748ecbaf84e6cdc433bf510fe7e76a6a6.webp
Its using the BUD-04 /mirror endpoint so its not using the clients bandwidth at all
Discussion
Here is the code that gets all the "imeta" blobs and any blossom compatible URLs in the content
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
That's great but I'm asking if when displaying blossom media and the URL is broken do the links "self heal"?
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
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
Have you looked into the WARC and CDX file formats? Webarchiving staples. WARC collections with fallbacks is a thing
Interesting, I need to look into this
If you wait [just a bit] I'll have something to show you.
I'll definitely be talking about it on Nostr, but if you want to drop your email at https://opfn.co that would work, too
Yeah, at some point I want to integrate it into the https://archiveweb.page/ extension
Wouldn't you prefer a decentralized solution that got the web archives from your peers..?
😎 Stay tuned