anvil.media
Module
Classes
TempFile
Classes
TempFile
Create a temporary file initialised with the contents of the provided media, if any.
Constructor
TempFile([media])
Instance Methods
__enter__() → string
__exit__()
Functions
download(media)
Download the given Media Object immediately in the user’s browser.
from_file(filename, [mime_type], [name]) → anvil.Media instance
Creates a Media object from the given file.
open(media) → BytesIO
Open a media file as Python BytesIO object
print_media(media)
Print the given Media Object immediately in the user’s browser.
write_to_file(media, filename)
Write a Media object to the given file