Las configuraciones fueron movidas y cambiadas un poco
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user