service-worker-gateway icon indicating copy to clipboard operation
service-worker-gateway copied to clipboard

Generate HTML preview for DAG-CBOR

Open lidel opened this issue 1 year ago • 3 comments

Filling this for completeness, and also as bare minimum to support https://dasl.ing/, but with lower priority than other things like #342

If request for DAG-CBOR CID is made with Accept header that includes text/html, we should generate HTML preview that

  • informs user that CID is DAG-CBOR
  • have option to download CBOR as a raw block (?format=raw, requires #356)
  • preview of CBOR document with clickable links to other CIDs (CBOR Tag 42)

Prior art in boxo/gateway: https://ipfs.io/ipfs/bafyreicnokmhmrnlp2wjhyk2haep4tqxiptwfrp2rrs7rzq7uk766chqvq/

Note:

  • MVP does not have to be styled with CSS or have links to anything other than Raw Block
  • we do not have conformance for this, but we should add one, that confirms CBOR Tag 42 link is present and clickable

lidel avatar Dec 05 '24 23:12 lidel

FYI that this is in verified-fetch now and we just need to add the new plugin to our verifiedFetch options

SgtPooki avatar Jun 19 '25 13:06 SgtPooki

re-opening until i confirm it's fixed on inbrowser.dev

SgtPooki avatar Jun 23 '25 19:06 SgtPooki

it's available on inbrowser.dev but there is a related issue: https://github.com/ipfs/helia-verified-fetch/issues/257

leaving this open here as well to track

SgtPooki avatar Jun 24 '25 18:06 SgtPooki