コード例 #1
0
        public async Task <IActionResult> Upload(List <IFormFile> imagelist)
        {
            var userId     = Int32.Parse(HttpContext.User.Claims.ToList()[0].Value);
            var imageNames = await UploadSmartRateImages(imagelist, userId);

            var smartRateValue = await faceRecognitionService.GetSmartRateForImages(imageNames);

            return(RedirectToAction("Profile", new RouteValueDictionary(
                                        new { controller = "CustomerProfile", action = "Profile", smartRateValue })));
        }
コード例 #2
0
        public async Task <IActionResult> UploadForSmartRating(UploadViewModel model)
        {
            var userId     = Int32.Parse(HttpContext.User.Claims.ToList()[0].Value);
            var imageNames = await UploadSmartRateImages(model.Imagelist, userId);

            var smartRateValue = await faceRecognitionService.GetSmartRateForImages(imageNames);

            serviceService.UpdateSmartRating(smartRateValue, model.EventId);

            return(RedirectToAction(nameof(MyEventsController.Index), "MyEvents"));
        }