Skip to main content

File Download

Show a button for the user to download a file.

Examples

Basic Example

The following example demonstrate some of the available functionality for display_file

from abstra.forms import display_file

display_file(
"https://placekitten.com/200/300", download_text="Click here to reveal the secret"
)

Parameters

NameDescriptionType
fileThe file to downloadUnion[str, io.IOBase]
download_textThe text to display on the button that will download the file. Defaults to "Download here".str
end_programWhether the program should end after the widget is shown. Defaults to False.bool
full_widthWhether the input should use full screen width. Defaults to False.bool
button_textWhat text to display on the button when the widget is not part of a Page. Defaults to 'Next'.str