IpfsStorage.uploadBatch() method
Uploads a folder to storage.
Signature:
uploadBatch(files: (string | FileOrBuffer)[], fileStartNumber?: number, contractAddress?: string, signerAddress?: string, options?: {
onProgress: (event: UploadProgressEvent) => void;
}): Promise<{
baseUri: string;
uris: string[];
}>;
Parameters
| Parameter | Type | Description |
|---|---|---|
| files | (string | FileOrBuffer)[] | An array of the data to be uploaded. Can be a files or buffers (which will be loaded), or strings. (can be mixed, too) |
| fileStartNumber | number | (Optional) Optional. The first file file name begins with. |
| contractAddress | string | (Optional) Optional. The contract address the data belongs to. |
| signerAddress | string | (Optional) Optional. The address of the signer. |
| options | { onProgress: (event: UploadProgressEvent) => void; } | (Optional) Optional. Upload progress callback. |
Returns:
Promise<{ baseUri: string; uris: string[]; }>
- The CID of the uploaded folder.