blob: 7a5303ecdd60ad8791bdcced3789ea0fc74ffdbe (
plain)
1
2
3
4
5
6
7
8
9
|
from flask import request
def isFilenameAllowed(filename, exts):
return "." in filename and \
filename.rsplit(".", 1)[1].lower() in exts
def shouldReturnJson():
return "application/json" in request.accept_mimetypes and \
not "text/html" in request.accept_mimetypes
|