typescript-sdk

Home > @3rdweb/sdk > IStorage > upload

IStorage.upload() method

Uploads a file to the storage.

Signature:

upload(data: string | File | FileOrBuffer | Buffer, contractAddress?: string, signerAddress?: string): Promise<string>;

Parameters

Parameter Type Description
data string | File | FileOrBuffer | Buffer The data to be uploaded. Can be a file/buffer (which will be loaded), or a string.
contractAddress string Optional. The contract address the data belongs to.
signerAddress string Optional. The address of the signer.

Returns:

Promise<string>