Réparation download

pull/1/head
kitoy 2020-11-29 02:28:35 +01:00
parent c80b2d63d0
commit c06eb18b2a
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