webflow.createAsset(fileBlob)Create a new asset on your Webflow site.
This method is specifically for creating new assets - if you need to update an existing asset, use the set asset file method instead. Be sure to review the limits and MIME types sections to ensure your files meet the requirements.
To add an asset to a page:
element.setAsset(asset) method to set the assetfileBlob:File - Represents a valid File to upload. Refer to the examples below for guidance on uploading an asset from a remote source and directly from a file picker.Promise<Asset>
A Promise that resolves to the new Asset.
If the method fails to create an asset, the method will return an error with the following cause and message.
Uploaded assets must adhere to specific size limitations:
Refer to the accepted MIME types listed below for compatibility. Pass Lottie files as application/json MIME types.