From c3d5060ec99d2cd3d114f9a574249febd7e77246 Mon Sep 17 00:00:00 2001 From: Glen Chao Date: Thu, 11 Apr 2019 23:35:21 -0700 Subject: [PATCH] Fix post url and data stream * Fix post url to point to the correct path * Data passed to cog should be the stream instead of the blob (blob will timeout) --- javascript/ResizeImage/index-module5.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/ResizeImage/index-module5.js b/javascript/ResizeImage/index-module5.js index a8dfb0d..1e7b418 100644 --- a/javascript/ResizeImage/index-module5.js +++ b/javascript/ResizeImage/index-module5.js @@ -12,7 +12,7 @@ module.exports = function (context, myBlob) { context.done(error); } else { context.log('calling cog svc'); - axios.post(process.env.COMP_VISION_URL + '/analyze?visualFeatures=Description&language=en', myBlob, { + axios.post(process.env.COMP_VISION_URL + 'vision/v2.0/analyze?visualFeatures=Description&language=en', stream, { headers: { 'Ocp-Apim-Subscription-Key': process.env.COMP_VISION_KEY, 'Content-Type': 'application/octet-stream'