Las configuraciones fueron movidas y cambiadas un poco

This commit is contained in:
Daniel Cortes
2019-02-19 01:38:22 -03:00
parent 2633f84fc7
commit 6e9af8302d
2 changed files with 8 additions and 6 deletions

View File

@@ -6,13 +6,11 @@ from files.auth import admin_required
import random
ALLOWED_EXTENSIONS = set(['png', 'jpg', 'jpeg', 'gif', 'md'])
bp = Blueprint('files', __name__)
bp.add_url_rule('/uploads/<path:filename>', 'uploaded_file', build_only=True)
def allowed_file(filename):
return '.' in filename and filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
return '.' in filename and filename.rsplit('.', 1)[1].lower() in current_app.config['ALLOWED_EXTENSIONS']
@bp.route('/', methods=['GET', 'POST'])
def index():