Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

dcc.Download doesn't open a file picker dialog on Safari #1012

@kamatsuoka

Description

@kamatsuoka

MacOS Sonoma 14.2.1
Safari 17.2.1

dcc.Download doesn't open a file picker dialog on Safari. Instead, it just downloads the file to the ~/Downloads directory using the supplied filename. Example that works as expected on Chrome:

from dash import Dash, Input, Output, callback, dcc, html

app = Dash(__name__)
app.layout = html.Div(
    [
        html.Button("Download Text", id="btn-download-txt"),
        dcc.Download(id="download-text"),
    ]
)


@callback(
    Output("download-text", "data"),
    Input("btn-download-txt", "n_clicks"),
    prevent_initial_call=True,
)
def func(n_clicks):
    return dict(content="Hello world!", filename="hello.txt")


if __name__ == "__main__":
    app.run(debug=True)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions