Exemplo n.º 1
0
        public ActionResult Upload(Photo model, HttpPostedFileBase image)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var path = SavePhotoService.UploadPhoto(image);

            _photoService.AddPhotoToGallery(path, model);

            return(RedirectToAction("Details", "Galleries", new { Id = model.GalleryId }));
        }