From bcbaf52777fc096a16c76ae48d1ef687b03ba76a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Thuret?= Date: Mon, 25 Oct 2021 10:52:55 +0200 Subject: [PATCH] format --- app/app.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/app.py b/app/app.py index d865f4e..662d617 100644 --- a/app/app.py +++ b/app/app.py @@ -7,7 +7,7 @@ from functools import wraps import argostranslatefiles import pkg_resources from argostranslatefiles import get_supported_formats -from flask import Flask, abort, jsonify, render_template, request, url_for, send_from_directory, send_file +from flask import Flask, abort, jsonify, render_template, request, url_for, send_file from flask_swagger import swagger from flask_swagger_ui import get_swaggerui_blueprint from translatehtml import translate_html @@ -584,6 +584,7 @@ def create_app(args): translated_file_path = argostranslatefiles.translate_file(src_langs[0].get_translation(tgt_lang), filepath) translated_filename = os.path.basename(translated_file_path) + return jsonify( { "translatedFileUrl": url_for('download_file', filename=translated_filename, _external=True)