From 1d7b8a5e65fd357ef8247e0cb9b1891357d1bdba Mon Sep 17 00:00:00 2001 From: =?utf8?q?Olivier=20T=C3=A9tard?= Date: Fri, 13 Nov 2015 10:59:49 +0100 Subject: [PATCH] On autorise uniquement les fichiers OGG et MP3 --- femtoblackweb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/femtoblackweb.py b/femtoblackweb.py index e185881..c581705 100644 --- a/femtoblackweb.py +++ b/femtoblackweb.py @@ -43,9 +43,9 @@ def index(): @app.route('/upload', methods=['GET', 'POST']) def upload_file(): - + def allowed_file(filename): - ALLOWED_EXTENSIONS = ['mp3', 'ogg', 'flac'] + ALLOWED_EXTENSIONS = ['mp3', 'ogg'] return '.' in filename and filename.rsplit('.', 1)[1] in ALLOWED_EXTENSIONS if request.method == 'POST': -- 2.30.2