From c06eb18b2a32ede4de57214f711d77061122c97f Mon Sep 17 00:00:00 2001 From: kitoy Date: Sun, 29 Nov 2020 02:28:35 +0100 Subject: [PATCH] =?UTF-8?q?R=C3=A9paration=20download?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MyWebApp.py | 1 + 1 file changed, 1 insertion(+) diff --git a/MyWebApp.py b/MyWebApp.py index c95a8fa..20c5381 100755 --- a/MyWebApp.py +++ b/MyWebApp.py @@ -70,6 +70,7 @@ def parametres() : @app.route('/up/view/') def download(nom): if 'username' in session : + UTILISATEUR='%s' % escape(session['username']) nom = secure_filename(nom) if os.path.isfile(DOSSIER_PERSO + UTILISATEUR + '/files/' + nom): # si le fichier existe return send_file(DOSSIER_PERSO + UTILISATEUR + '/files/' + nom, as_attachment=True) # on l'envoie