Exemplo n.º 1
0
        public ActionResult Download()
        {
            string fileName        = Request ["FileName"];
            string decodedFileName = MonoHelper.DecodeName(fileName);

            FileModel downloadFile = new FileModel(decodedFileName);

            return(File(downloadFile.File.FullName, "application/octet-stream", downloadFile.File.Name));
        }
Exemplo n.º 2
0
        public ActionResult Browse()
        {
            string pathName = Request["PathName"];

            string decodedPathName = MonoHelper.DecodeName(pathName);

            var root = new DirModel(decodedPathName);

            root.LoadSubDirs();
            root.LoadFiles();
            ViewData ["RootDir"] = root;
            return(View());
        }