Beispiel #1
0
        public async Task <JsonResult> FromFile(IFormFile imgFile)
        {
            using (var stream = new MemoryStream())
            {
                await imgFile.CopyToAsync(stream);

                var visionUtil = new VisionUtils(_azureSettings);
                return(Json(await visionUtil.GetResult(stream)));
            }
        }
Beispiel #2
0
        public async Task <JsonResult> Index(string imageUrl)
        {
            var visionUtil = new VisionUtils(_azureSettings);

            return(Json(await visionUtil.GetResult(imageUrl)));
        }