Closed MHuberFaust closed 6 years ago
All produced files will be saved as a ZIP archive in the current working directory by default.
Do not save the files automatically, but offer a button that triggers the saving.
@app.route('/model/download')
def download_generated_data():
return send_file(pathlib.Path(tempdir, 'topicmodeling.zip'), # dump it to static folder?
mimetype='???', # is there a mimetype for ZIP archives?
attachment_filename='topicmodeling.zip',
as_attachment=True)
If I merge testing into master, the issue will close. When the download button is pressed, the ZIP archive is automatically saved to the download folder. So it doesn't open a dialog or anything, like in a normal browser. Implementing such a dialog would be an extension for a later release.
Here is an example for a download manager in C++: http://doc.qt.io/qt-5/qtnetwork-downloadmanager-downloadmanager-cpp.html
One could translate that into Python or something. No idea.
Isn't a call to QFileDialog.getSaveFileName
enough?
Great, thank you! Exactly what I was looking for :)
make a zip file downloadable including file for configuration, doc-topic, topic-key, key-weight?, static visualisation?