示例#1
0
        public async Task <IActionResult> SaveImage(int?productId, IFormFile image)
        {
            if (productId == null)
            {
                return(BadRequest());
            }

            await productsService.ChangeImage(productId.Value, image);

            return(RedirectToAction(nameof(Index)));
        }