From 1c2138b6323f359e664a05ac00586e69fea716d1 Mon Sep 17 00:00:00 2001 From: fabrice Date: Sun, 23 Jun 2019 16:54:49 +0000 Subject: [PATCH] Update 'face_recognition/app/app.py' --- face_recognition/app/app.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/face_recognition/app/app.py b/face_recognition/app/app.py index 43bf26a..8cd0e5a 100644 --- a/face_recognition/app/app.py +++ b/face_recognition/app/app.py @@ -37,8 +37,7 @@ def new_user_id(): #call like https://face.sguba.de/init_face?id=123&encoded_string=abc def new_face(): id = request.args.get('id', None) - data = dict(request.form) - img=data['content'] + img = request.args.get('encoded_string', None) imgdata = base64.b64decode(img) with open('/tmp/'+str(id), 'wb') as file: file.write(imgdata) @@ -53,8 +52,7 @@ def new_face(): #call like https://face.sguba.de/check_face?id=123&encoded_string=abc def check_face(): id = request.args.get('id', None) - data = dict(request.form) - img=data['content'] + img = request.args.get('encoded_string', None) imgdata = base64.b64decode(img) with open('/tmp/'+str(id), 'wb') as file: file.write(imgdata)