Exemplo n.º 1
0
        public async Task <IActionResult> Upload(IFormFile image)
        {
            if (image != null)
            {
                using (var stream = image.OpenReadStream())
                {
                    var imageId = await imageStorage.SaveImage(stream, image.FileName);

                    return(RedirectToAction("Show", new { id = imageId }));
                }
            }

            return(View());
        }