Avaiga / taipy-gui

Graphical User Interface generator for Taipy
Apache License 2.0
60 stars 20 forks source link

BUG-When downloading a byte stream we don't get the expected file name #966

Closed gbritoda closed 1 year ago

gbritoda commented 1 year ago

Description According to the manual on file_download, if we put name=something, we get that as a suggested download name when we download our file. However, I've been getting TaiPyContent.bin whenever I try to download a byte stream from python (and not an actual physical file).

See example code below

How to reproduce

from taipy.gui import Gui, State

DOWNLOAD_CONTENT = b"Content"

page = """
<|{DOWNLOAD_CONTENT}|file_download|name=my_downloadable_file.txt|>
"""

GUI_OBJ = Gui(page=page)
GUI_OBJ.run(
        host="0.0.0.0",
        port=1234,
        dark_mode=False,
        debug=True,
        use_reloader=True,
)

Expected behavior When clicking downloading, should get a file named my_downloadable_file.txt, but we get TaipyContent.bin instead.

Screenshots image

Runtime environment

FredLL-Avaiga commented 1 year ago

duplicate of Avaiga/taipy#433