def preview(): image_spec = image_spec_factory.create(json.loads(request.values['image'])) image_preview = image_spec.preview() return Response(json.dumps(image_preview), mimetype='application/json')
def preview(): image_spec = image_spec_factory.create(request.get_json()) image_preview = image_spec.preview() return Response(json.dumps(image_preview), mimetype='application/json')
def download(): image = image_spec_factory.create(json.loads(request.values['image'])) taskId = image.download(request.values['name'], username, downloader) return Response(taskId, mimetype='text/plain')