Example #1
0
        public ActionResult Descargar(int id)
        {
            var pathCompleto = _pagosManager.GenerarZipComplementoPago(id);

            byte[] archivoFisico = System.IO.File.ReadAllBytes(pathCompleto);
            string contentType   = MimeMapping.GetMimeMapping(pathCompleto);

            var cd = new System.Net.Mime.ContentDisposition
            {
                FileName = Path.GetFileName(pathCompleto),
                Inline   = false,
            };

            Response.AppendHeader("Content-Disposition", cd.ToString());
            return(File(archivoFisico, contentType));
        }