Пример #1
0
 public FileContentResult DownloadFile(string scriptid, string scriptname)
 {
     if (string.IsNullOrEmpty(scriptid))
     {
         return(new FileContentResult(null, null));
     }
     return(File(System.Text.Encoding.UTF8.GetBytes(Model.BundleScript(SiteModel.GetLocalScript(scriptid).Select(s => s.code).ToList <string>())), "application/x-javascript", scriptname + ".js"));
 }