16 lines
484 B
Python
16 lines
484 B
Python
|
import flet as ft
|
||
|
|
||
|
def main(page: ft.Page):
|
||
|
# Button click handler to launch the download URL
|
||
|
def on_download_click(e):
|
||
|
# Launch the URL to trigger file download
|
||
|
page.launch_url("http://awesom-o.org:8000/download/tedt.pdf")
|
||
|
|
||
|
# Create an ElevatedButton that will trigger the download
|
||
|
download_button = ft.ElevatedButton("Download myfile", on_click=on_download_click)
|
||
|
|
||
|
# Add the button to the page
|
||
|
page.add(download_button)
|
||
|
|
||
|
ft.app(target=main)
|