learn-awesome / learndb

Curated learning resources with topics, formats, difficulty levels, expert reviews and metadata tags
https://learndb.vercel.app
125 stars 22 forks source link

Links for books should include IPFS hash of the file for easy, direct download #14

Open nileshtrivedi opened 2 years ago

nileshtrivedi commented 2 years ago

One idea is to change a link from format|url to format|url|ipfsHash. Then the frontend can decide to use whatever IPFS gateway to fetch the content.

Another way is to embed ipfsHash in the url itself to make URLs self-validating.

A book might exist in various formats: PDF / EPUB / AZW etc. On top of that, a book can have multiple editions. So, the ipfsHash is really a property of a specific file. If the URL points to a specific file, then it makes sense to have the ipfsHash be part of the URL. But if URL points to a generic page with multiple versions of the files, then combining generic URL with a specific Hash does not seem correct.

nileshtrivedi commented 1 year ago

image