def allowed_file(app, filename):
    """
    For a given file, return whether it's an allowed type or not
    """
    return '.' in filename and \
           filename.rsplit('.', 1)[1] in app.config['ALLOWED_EXTENSIONS']