Exemple #1
0
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
Exemple #2
0
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 ""
Exemple #3
0
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)
Exemple #4
0
def upload(info=None):
    if 'photo' in request.form:
        process_image(request.form['photo'][22:], info['uid'])
        get_image.cache_clear()
    return redirect('/', 302)