IpfsUploader

Default uploader used - handles uploading arbitrary data to IPFS

Example

// Can instantiate the uploader with default configuration and your client ID when used in client-side applications
const 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 applications
const uploader = new StorageUploader();
const secretKey = "your-secret-key";
const storage = new ThirdwebStorage({ secretKey, uploader });
// Or optionally, can pass configuration
const options = {
// Upload objects with resolvable URLs
uploadWithGatewayUrl: true,
};
const uploader = new StorageUploader(options);
const clientId = "your-client-id";
const storage = new ThirdwebStorage({ clientId, uploader });

Methods

Properties