IpfsUploader
Default uploader used - handles uploading arbitrary data to IPFS
// Can instantiate the uploader with default configuration and your client ID when used in client-side applicationsconst uploader = new StorageUploader();const clientId = "your-client-id";const storage = new ThirdwebStorage({ clientId, uploader }); // Can instantiate the uploader with default configuration and your secret key when used in server-side applicationsconst uploader = new StorageUploader();const secretKey = "your-secret-key";const storage = new ThirdwebStorage({ secretKey, uploader }); // Or optionally, can pass configurationconst options = { // Upload objects with resolvable URLs uploadWithGatewayUrl: true,};const uploader = new StorageUploader(options);const clientId = "your-client-id";const storage = new ThirdwebStorage({ clientId, uploader });
class IpfsUploader
Upload an array of arbitrary file data or JSON strings
function uploadBatch( data: Array<FileOrBufferOrString>,): Promise<Array<string>>;
If specified, will upload objects with gateway URLs instead of schemes
let uploadWithGatewayUrl: boolean;