Ipfs Download Button

Hi,

I would like to integrate an ipfs download button into a html file, but I am not sure how to do that.

Aim:
Button opens new tab in browser with a linked file, so the button should not be static but should take https://ipfs.io/ipfs/ + (input hash).

Can someone provide me with an example?

Kind regards
Cheerio

hello cheerio,

you can see that (windows location is disable in website) but i think it can works : https://jsbin.com/newoxoxiqu/1/edit?html,js,console,output

Could not make it work…

What does this line of code stand for:
let hash = document.querySelector(’#ipfsViewer’).dataset.ipfshash;

Thanks :slight_smile:

so i get DOM element which has id attribute ipfsViewer after i need to get in dataset attribute ipfshash

regards