🚀 Gen 5 of the leading AI app deployment platform launches October 6. Click for the livestream.

dcc.Download "save as" popup?


Is there a way for the dcc.Download component to trigger a “save as” popup? Right now I always save a file as e.g. dashboard.html, which then results in a pile-up of of dashboard.html(1), dashboard.html(2)…dashboard.html(31) in the downloads folder.

@Emil ?


Hi @oegedijk
Yes there’s a way to do that. You can create a callback which will fire whenever you click on a download button and will ask for a name to be input in an input box. And after submitting the text in the input box it’ll update the the name of the “data” component of dcc.download.
Hope it’ll help you.

I believe this is a browser setting. In chrome for example, you set it in settings, advanced settings, checkbox “Ask where to save each file before downloading”. You can however manipulate the suggested file name if you like.

Okay, so there is no way from the server side to force that behaviour?