Beispiel #1
0
        public ActionResult fileConversion(video x)
        {
            //Save user's file, it will be deleted in the toNewType function call
            string name = "", path = "";

            if (x.media != null)
            {
                name = Path.GetFileName(x.media.FileName);
                path = Path.Combine(Server.MapPath("~/App_Data"), name);
                x.media.SaveAs(path);
                x.toNewType(name);
            }

            else
            {
                x.message = "An error has occurred. Please try again";
            }

            return(View("converter", x));
        }