Our great sponsors
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
const isIpfsGatewayAvailable = (gatewayUrl: string): Promise => new Promise((resolve) => { const timeoutId = window.setTimeout( () => resolve(false), 1000 ); const img = new Image(); img.addEventListener("load", () => { window.clearTimeout(timeoutId); resolve(true); }); img.addEventListener("error", () => { window.clearTimeout(timeoutId); resolve(false); }); img.src = `${gatewayUrl.replace( "", // https://github.com/ipfs/public-gateway-checker/blob/master/src/constants.ts "bafybeibwzifw52ttrkqlikfzext5akxu7lz4xiwjgwzmqcpdzmp3n5vnbe" )}?now=${Date.now()}&filename=1x1.png#x-ipfs-companion-no-redirect`; });
I've been wanting to dip my toes into the Web 3.0 verse for a while now, specifically with an integration into my side project, a Desktop environment in the browser (daedalOS).
I've also added file type detection so it can try to open the url in the correct app. This is done using the library file-type.
I've decided as a first step I would add ipfs native url support. I've added this support to the Browser (Demo), Run Dialog, Shortcuts & Terminal. Most of the main ipfs functions I've migrated to utils/ipfs.ts.