October 2019
Intermediate to advanced
426 pages
10h 8m
English
We are reusing the exact same implementation of the upload image endpoint from the Pictorial Translator project. For more implementation details and design choices for this code snippet. Please refer to Chapter 3, Detecting and Translating Text with Amazon Rekognition and Translate:
@app.route('/images', methods = ['POST'], cors = True)def upload_image(): """processes file upload and saves file to storage service""" request_data = json.loads(app.current_request.raw_body) file_name = request_data['filename'] file_bytes = base64.b64decode(request_data['filebytes']) image_info = storage_service.upload_file(file_bytes, file_name) return image_info
Now the Contact Organizer's orchestration layer is complete.
Read now
Unlock full access