Skip to main content

IpfsUploader class

Default uploader used - handles uploading arbitrary data to IPFS

Signature:

export declare class IpfsUploader implements IStorageUploader<IpfsUploadBatchOptions>

Implements: IStorageUploader<IpfsUploadBatchOptions>

Example

// Can instantiate the uploader with default configuration
const uploader = new StorageUploader();
const storage = new ThirdwebStorage({ uploader });

// Or optionally, can pass configuration
const options = {
// Upload objects with resolvable URLs
uploadWithGatewayUrl: true,
};
const uploader = new StorageUploader(options);
const storage = new ThirdwebStorage({ uploader });

Constructors

ConstructorModifiersDescription
(constructor)(options)Constructs a new instance of the IpfsUploader class

Properties

PropertyModifiersTypeDescription
uploadWithGatewayUrlboolean

Methods

MethodModifiersDescription
uploadBatch(data, options)