Beispiel #1
0
        public ActionResult ParseMaterial(ParseMaterialViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return(View(model));
            }

            var material = _materialService.CreateMaterial(model.File.InputStream, model.Image.InputStream, model.Image.ContentType,
                                                           model.Type, model.Name, model.Description, User.Identity.GetUserId <int>(), ImageMaxWidth, ImageMaxHeight);

            TempData["MaterialModel"] = material;
            return(RedirectToAction("Save"));
        }