Skip to main content

IpfsStorage.uploadBatch() method

Uploads a folder to storage.


uploadBatch(files: (string | FileOrBuffer)[], fileStartNumber?: number, contractAddress?: string, signerAddress?: string, options?: {
onProgress: (event: UploadProgressEvent) => void;
}): Promise<{
baseUri: string;
uris: string[];


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)
fileStartNumbernumber(Optional) Optional. The first file file name begins with.
contractAddressstring(Optional) Optional. The contract address the data belongs to.
signerAddressstring(Optional) Optional. The address of the signer.
options{ onProgress: (event: UploadProgressEvent) => void; }(Optional) Optional. Upload progress callback.


Promise<{ baseUri: string; uris: string[]; }>

  • The CID of the uploaded folder.