You are currently viewing the new Beta Editor Docs.
Switch to the Classic Editor Docs
You are currently viewing the Classic Editor Docs.
Switch to the Beta Editor Docs

anvil.media Module

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.


        Print the given Media Object immediately in the user’s browser.


          write_to_file(media, filename)

          Write a Media object to the given file



            anvil.media