IStorage.uploadBatch() method
Uploads a folder to storage.
Signature:
uploadBatch(files: (string | FileOrBuffer)[], fileStartNumber?: number, contractAddress?: string, signerAddress?: string, options?: {
onProgress: (event: UploadProgressEvent) => void;
}): Promise<UploadResult>;
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<UploadResult>
- The CID of the uploaded folder.