Asset API
Provides an API for importing assets, and saving screenshots / recordings.
asset.import
Signatures
import(url)
Description
Provides a way to import an image into a given session context. The image will be downloaded and encoded as a base64 string.
Example:
local my_image = asset.import("https://example.com/image.jpg")
asset.upload
Signatures
upload(ref, label \ nil)
Description
Upload an image or recording to the TV Labs cloud. The image will be uploaded to the TV Labs object store for the given organization, and a URL will be returned.
Example:
local my_image = screen.capture()
local stored_image = asset.upload(my_image)
print(stored_image)
-- [true, "https://tvlabsassets.com/..."]