Merge pull request 'Réparation download' (#1) from download into master

This commit is contained in:
kitoy totoy 2020-11-29 02:32:39 +01:00
commit 74144a6ae2
1 changed files with 1 additions and 0 deletions

View File

@ -70,6 +70,7 @@ def parametres() :
@app.route('/up/view/<nom>')
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