Réparation download
This commit is contained in:
		
							parent
							
								
									c80b2d63d0
								
							
						
					
					
						commit
						c06eb18b2a
					
				@ -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
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user