public async Task <IActionResult> Add(AdminPhotoInputModel model) { if (!ModelState.IsValid) { return(RedirectToAction(nameof(Index))); } var userId = this.userManager.GetUserId(this.User); await this.cloudinaryService.UploadImageAsync(model.Photo, userId); return(RedirectToAction(nameof(Index))); }
public IViewComponentResult Invoke() { var model = new AdminPhotoInputModel(); return(View(model)); }