![]() Canvas components can take a snapshot of what you’ve drawn as a Media object by calling get_image().You can store media in a Data Table, with the “Media” column type.You can trigger a Media object download in the user’s browser by calling (my_media_object) in any client-side code.This opens orĭownloads the media when the link is clicked. You can open any Media object by setting the url property of a Link to a Media object.You can send and receive email attachments as Media objects.When a user uploads a file into a FileLoader component, the FileLoader’s file property is a Media object.Display a picture in an Image component by setting its source property to a Media object.Here are a few things you can do with Media objects: You can pass Media objects to and from server functions, store them in Data Tables, You can alsoĬreate them directly in Python code from byte strings or source URLs. ![]() Media objects are created by Anvil APIs such as FileLoader components and the Google Drive API. Check the Quickstart to see some examples using them. All binary data (pictures, uploaded files, etc.) is represented in Anvil as Media objects.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |