def update(info=None): if 'photo' in request.form: process_image(request.form['photo'][22:], info['uid']) get_image.cache_clear() ldap_update_profile(request.json, info['uid']) return jsonify({"success": True}), 200
def update(uid=None, info=None): if request.method == "POST" and 'photo' in request.files: return process_image(request.files['photo']) else: ldap_update_profile(request.form, info['uid']) return ""
def upload(uid=None, info=None): if request.method == 'POST' and 'photo' in request.files and process_image( request.files['photo'], info['uid']): return redirect('/', 302) return redirect('/', 302)
def upload(info=None): if 'photo' in request.form: process_image(request.form['photo'][22:], info['uid']) get_image.cache_clear() return redirect('/', 302)