Home > @3rdweb/sdk > IStorage > upload
Uploads a file to the storage.
Signature:
upload(data: string | File | FileOrBuffer | Buffer, contractAddress?: string, signerAddress?: string): Promise<string>;
| 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>