public ActionResult Consultar() { List <eFile> Files = new List <eFile>(); #region Excel eFile f_excel = new eFile(); List <Folio> folios = new List <Folio>(); for (int i = 0; i < 274; i++) { Folio folio = new Folio(); folio.Lote = 114; folio.ContadorLote = 683; folio.Color_Producto = "GRISP"; folio.Contador = i + 1; folios.Add(folio); } f_excel.FileStream = Excel.CrearExcelFolios(folios); f_excel.FileName = "folios.xlsx"; Files.Add(f_excel); //return File(FileBytesArray, "application/xlsx", "Folios" + ".xlsx"); #endregion eFile f_pdf = new eFile(); f_pdf.FileStream = Pdf.CreatePdf(folios); f_pdf.FileName = "folios.pdf"; Files.Add(f_pdf); byte[] FileBytesArray; FileBytesArray = Zip.CreateZip(Files); //return File(FileBytesArray, "pdf/application", "Folios" + ".pdf"); return(File(FileBytesArray, "application/octet-stream", "Folios.zip")); }
/// <summary> /// 去打包 /// </summary> /// <param name="_builds">打包的资源</param> /// <param name="updateList">变更的资源</param> public static void GoExport(AssetBundleBuild[] _builds, List <string> updateList) { if (_builds == null || _builds.Length == 0) { return; } string zipPath; string zipContent; string assetPath = WriteVersionToLocal(out zipPath, out zipContent); BuildPipeline.BuildAssetBundles(assetPath, _builds, BuildAssetBundleOptions.ChunkBasedCompression, BuildTarget.Android); AssetDatabase.Refresh(); Debug.Log("资源包创建成功"); string updateResPath = ExportHelp.GetUpdateRes(assetPath, updateList); //创建压缩包 //Zip.CreateZip(assetPath, zipPath); long zipSize = Zip.CreateZip(updateResPath, zipPath); WriteVersionListToLocal(zipContent, zipSize); AssetDatabase.Refresh(); Debug.Log("zip创建成功"); StartUpExe(zipContent); }