Update 'face_recognition/app/app.py'
This commit is contained in:
		@@ -41,11 +41,13 @@ def new_user_id():
 | 
			
		||||
def new_face():
 | 
			
		||||
    id  = request.args.get('id', None)
 | 
			
		||||
    img = request.args.get('encoded_string', None)
 | 
			
		||||
    img += "=" * ((4 - len(img) % 4) % 4)
 | 
			
		||||
    img = bytes(img, encoding='utf-8')
 | 
			
		||||
    #print(img, flush=True)
 | 
			
		||||
    #imgdata = base64.b64decode(img)
 | 
			
		||||
    #with open('/tmp/'+str(id), 'wb') as file:
 | 
			
		||||
    #    file.write(bytearray(imgdata))
 | 
			
		||||
    save_img(img.encode(), '/tmp/'+str(id)+'.jpg')
 | 
			
		||||
    save_img(img, '/tmp/'+str(id)+'.jpg')
 | 
			
		||||
    #to debug send img
 | 
			
		||||
    #minioClient.fput_object('users', str(id)+'.jpg', '/tmp/'+str(id)+'.jpg')
 | 
			
		||||
    #face = face_recognition.load_image_file('/tmp/'+str(id)+'.jpg')
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user