Files
schoolplanner/frontend/pages/test.py

16 lines
484 B
Python
Raw Normal View History

2025-01-19 00:04:08 +01:00
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)