File.save#
- File.save(stream)[source]#
Saves the contents of the file to a stream.
- Parameters:
stream –
Examples
Saving a File object to a stream.
>>> def saveFile(): ... pg = app.get_user_page() ... input_element = pg.get_element("file-element") # Assuming 'file-content' is an id of an element that uploads files ... files = input_element.get_files() ... for file in files: ... with open(file.name, "w") as stream: ... file.save(stream)