Esempio n. 1
0
        public ActionResult EditThreeModule(string id, HttpPostedFileWrapper file, string url)
        {
            string fileName = DateTime.Now.ToString("yyyyMMddhhssmm");
            var    vpath    = Path.Combine("/img/", fileName + Path.GetExtension(file.FileName));
            string path     = Server.MapPath("~" + vpath);

            file.SaveAs(path);

            JObject obj = new JObject();

            obj["id"]   = id;
            obj["url"]  = url;
            obj["path"] = vpath;

            api.EditThreeModule(obj);

            return(RedirectToAction("ThreeModule"));
        }