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
Constructor | Modifiers | Description |
---|---|---|
(constructor)(options) | Constructs a new instance of the IpfsUploader class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
uploadWithGatewayUrl | boolean |
Methods
Method | Modifiers | Description |
---|---|---|
uploadBatch(data, options) |