Live Chat

We'll need to share your messages (and your email address if you're logged in) with our live chat provider, Drift. Here's their privacy policy.

If you don't want to do this, you can email us instead at contact@anvil.works.

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