diff --git a/mo/web/util.py b/mo/web/util.py index 9aeeabbf84df08cb15b4b9b96aa83f3eff815415..1ef7d16aee4acdf85527b490e12acc35b1ef96ad 100644 --- a/mo/web/util.py +++ b/mo/web/util.py @@ -85,7 +85,10 @@ def send_job_result(job: db.Job) -> Response: type = 'application/binary' if os.path.isfile(file): - return send_file(file, mimetype=type) + return send_file(file, + mimetype=type, + as_attachment=True, + attachment_filename=job.out_file) else: logger.error(f'Soubor {file} je výsledkem jobu, ale ve FS neexistuje') raise werkzeug.exceptions.NotFound()