You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clemens edited this page Aug 8, 2024
·
2 revisions
Assets such as images or JavaScript files and be stored in a webstrate and accessed as resources. Uploading cat.png to the webstrate with ID 3FKdw63263aUrNEjYFE7uckqfQqf will make the resource accessible on /s/3FKdw63263aUrNEjYFE7uckqfQqf/cat.png.
To upload one or more assets using your operating system's built in file picker call:
webstrate.uploadAsset()
To programmatically upload a file use:
webstrate.addAssetFromFile(file)
To delete an asset:
webstrate.deleteAsset(assetName)
When an asset is added the asset event is triggered, and when one is deleted the assetDeleted event is triggered.