Home > @3rdweb/sdk > ModuleWithRoles > prepareMetadata
Prepares any set of metadata for uploading by recursively converting all Buffer|Blob|File objects into a hash of the object after its been uploaded to distributed storage (e.g. IPFS). After uploading any File|Buffer|Blob, the metadata is serialized to a string.
Signature:
prepareMetadata(metadata: MetadataURIOrObject): Promise<string>;
Parameter | Type | Description |
---|---|---|
metadata | MetadataURIOrObject | The list of metadata to prepare for upload. |
Returns:
Promise<string>