file_selector class
Allows uploading a file content.
Methods¶
__init__() ¶
__init__(
content=None,
label=None,
on_action=None,
multiple=False,
extensions=".csv,.xlsx",
drop_message="Drop here to Upload",
notify=True,
width=None,
active=True,
id=None,
properties=None,
class_name=None,
hover_text=None,
) -> None
Create a new file_selector element.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
content
|
dynamic(str)
|
The path or the list of paths of the uploaded files. |
None
|
label
|
str
|
The label of the button. |
None
|
on_action
|
Union[str, Callable]
|
A function or the name of a function that will be triggered.
|
None
|
multiple
|
bool
|
If set to True, multiple files can be uploaded. |
False
|
extensions
|
str
|
The list of file extensions that can be uploaded. |
.csv,.xlsx
|
drop_message
|
str
|
The message that is displayed when the user drags a file above the button. |
Drop here to Upload
|
notify
|
bool
|
If set to False, the user won't be notified of upload finish. |
True
|
width
|
Union[str, int]
|
The width of the element. |
None
|
active
|
dynamic(bool)
|
Indicates if this element is active. |
True
|
id
|
str
|
The identifier assigned to the rendered HTML component. |
None
|
properties
|
dict[str, Any]
|
A dictionary of additional properties that can be set to the element. |
None
|
class_name
|
dynamic(str)
|
A space-separated list of CSS class names to be applied to the generated HTML element. |
None
|
hover_text
|
dynamic(str)
|
The text that is displayed when the user hovers over the element. |
None
|