File#
- class toui._signals.File(file_dict, signal, app, file_id, ws=None)[source]#
Bases:
objectContains the information of an uploaded file and can be used to save the file contents.
This object should only be created through Element.get_files() method.
- name#
Name of the file.
- type#
Type of the file.
- size#
Size of the file.
- content#
Content of the file. If the parameter with_contents in the method Element.get_files was set as
True, you will be able to access the content using this attribute. Otherwise, the value of this attribute will beNone.- Type:
str or None
- last_modified#
The last modified date as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight).
- is_binary#
Set the value of this attribute to
Trueonly if you want the file content to be converted to bytes before saving it.- Type:
bool
See also
Element.get_files
Methods#
Saves the contents of the file to a stream. |