import { Storage } from"@solana-suite/storage";awaitStorage.uploadFile("file path",// upload content file path in local path "nftStorage"// set storage type);
Arweave
import { Storage } from"@solana-suite/storage";awaitStorage.uploadFile("./animals.jpeg",// upload content file path in local path "arweave",// set storage type {feePayer:"HTpCqDfm7NwxKrwaQww..."} // fee payer,s secret);
upload nft metadata(json)
nft.storage
import { Storage } from"@solana-suite/storage";constmeta= { name:"Tiger",// NFT's name in offchain symbol:"TIGER",// NFT's symbol in offchain description:"tiger description",// optional field image:"https://......",// Uploaded image url };constres=awaitStorage.uploadData(meta,"nftStorage");
arweave
import { Storage } from"@solana-suite/storage";constmeta= { name:"Tiger",// NFT's name in offchain symbol:"TIGER",// NFT's symbol in offchain description:"This nft is tiger content",// optional field image:"https://......",// Uploaded image url };constres=awaitStorage.uploadData( meta,"arweave", {feePayer:"HTpCqDfm7NwxKrwaQww..."} // fee payer,s secret );
Arweave is a paid service, so specifying the fee payer is always necessary.