Ejemplo n.º 1
0
        public async Task <ActionResult> FileUpload(HttpPostedFileBase file)
        {
            if (file == null)
            {
                return(RedirectToAction("Upload"));
            }

            var apiService = new FaceApiService(ConfigurationManager.AppSettings["FaceApiKey"]);

            byte[] resultImage = await apiService.UploadAndDetectFace(file);

            TempData["resultImageBase64"] = GetImageBase64String(resultImage);
            return(RedirectToAction("ViewFaces"));
        }