plotly / dash

Data Apps & Dashboards for Python. No JavaScript Required.
https://plotly.com/dash
MIT License
21.18k stars 2.04k forks source link

enable download of large file via dcc.download #1874

Open vicshi94 opened 2 years ago

vicshi94 commented 2 years ago

My code is attached below, very simple. I test the download function successfully with a small sample (1MB). However, I need to return a large file(CSV) of about 1 GB, which raises the Memory Error. What should I do?

dbc.Button('Download', color='primary', id='btn_data',outline=True),
                                dcc.Download(id="download-image")
@app.callback(
    Output("download_data", "data"),
    Input("btn_data", "n_clicks"),
    prevent_initial_call=True,
)
def func(n_clicks):
    return dcc.send_file(
        "./download/verylarge.csv"
    )
beren2 commented 1 year ago

Hi,

have you found a solution to this problem ?

nickmelnikov82 commented 1 year ago

Hello! I have the same problem, did you find a solution?

Entspannter commented 6 months ago

Did anyone solve this in the meantime?