Filepicker not working in web browser #3797
-
Duplicate Check
Describe the bugfilepicket not working in web browser please help Code sampleCodefrom flet import *
class user_pdf_pg(UserControl):
def __init__(self):
super(user_pdf_pg, self).__init__()
def build(self):
self.mypdf = Column(scroll="always")
self.progress_ring = ProgressBar(width=500, height=16, visible=False)
self.ring_container = Container(content=self.progress_ring)
self.saveme = FilePicker(on_result=self.mysavefile)
for trade in list_of_trd:
print(trade)
self.mypdf.controls.append(
ListTile(
leading=Icon(name="picture_as_pdf"),
title=Text(f"Generate Trade Report"),
trailing=IconButton(
icon=icons.DOWNLOAD,
on_click=self.save_file
)
)
)
self.page.overlay.append(self.saveme)
return Container(
expand=1,
content=Column([
self.ring_container,
self.mypdf,
]),
)
def save_file(self, e):
self.saveme.save_file()
print('---save_file called---')
def mysavefile(self, e: FilePickerResultEvent):
print('---mysavefile called--**************************-')
save_location = e.path
print(f"FilePicker result: {e}")
self.page.update()
def main(page: Page):
page.title = "PDF Report Generator"
page.add(user_pdf_pg())
app(target=main, view=WEB_BROWSER) To reproduceassert self.__page, "Control must be added to the page first." Expected behaviorNo response Screenshots / VideosCaptures[Upload media here] Operating SystemLinux Operating system detailsubuntu 22.04 Flet version0.23.2 RegressionYes, it used to work in a previous Flet version (please specify the version in additional details) SuggestionsNo response LogsLogs[Paste your logs here] Additional detailsNo response |
Beta Was this translation helpful? Give feedback.
Answered by
covixx
Aug 13, 2024
Replies: 1 comment 1 reply
-
Could you provide list_of_trd |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
pamraman2009
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could you provide list_of_trd