I have Uploaded a fully string data in IPFS:- the URL is:- https://bafybeih3u62l664yz4ffpgrjci6ytl64rbivsgpovv6csty3j6kbx6natm.ipfs.infura-ipfs.io/ I put this URL in browser and it perfectly showing it, is there any way, I can fetch this URL using JavaScript and show it to frontend like a image source attribute
1 Answer
You can do this
fetch('https://bafybeih3u62l664yz4ffpgrjci6ytl64rbivsgpovv6csty3j6kbx6natm.ipfs.infura-ipfs.io/')
.then(response => response.text())
.then(data =>{
document.getElementById('yourimg').src = data;
});