Storage
Everything uploaded using thirdweb is automatically uploaded and pinned to IPFS.
Please connect your wallet to begin uploading.
Your Pinned Files
Please connect your wallet to see the files you have pinned.
Gateway
This is the structure of your unique gateway URL:
https://{client-id}.ipfscdn.io/ipfs/
Gateway requests need to be authenticated using a client ID. You can get it by creating an API key from the dashboard settings.
CLI
Using thirdweb CLI, you can easily upload files and folders to IPFS from your terminal:
npx thirdweb upload ./path/to/file-or-folder
If this is the first time that you are running this command, you may have to first login using your secret key. Learn more here.
Integrate into your app
import { ThirdwebStorage } from "@thirdweb-dev/storage";
// First, instantiate the thirdweb IPFS storageconst storage = new ThirdwebStorage({ secretKey: "YOUR_SECRET_KEY", // You can get one from dashboard settings});
// Here we get the IPFS URI of where our metadata has been uploadedconst uri = await storage.upload(metadata);// This will log a URL like ipfs://QmWgbcjKWCXhaLzMz4gNBxQpAHktQK6MkLvBkKXbsoWEEy/0console.info(uri);
// Here we a URL with a gateway that we can look at in the browserconst url = await storage.resolveScheme(uri);// This will log a URL like https://ipfs.thirdwebstorage.com/ipfs/QmWgbcjKWCXhaLzMz4gNBxQpAHktQK6MkLvBkKXbsoWEEy/0console.info(url);
// You can also download the data from the uriconst data = await storage.downloadJSON(uri);