示例#1
0
        public ActionResult AddAnimalProfilePhoto([FromQuery] int animalId,
                                                  [FromForm(Name = "ProfilePhoto")] IFormFile profilePhoto)
        {
            var access = _accessValidator.CheckAnimalAccess(animalId);

            if (!access)
            {
                return(Forbid());
            }

            var result = _animalRepository.AddAnimalProfilePhoto(animalId, profilePhoto);

            return(ResponseToActionResult(result));
        }