From 685d95b3766941442ee66a2d233fddda1be5a7a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?old=E6=98=93?= <156663459@qq.com> Date: Wed, 6 Dec 2023 11:04:01 +0800 Subject: [PATCH] pdf control deny --- .../Front/PcVolunteerController.cs | 22 +++++++++---------- New_College.Api/New_College.xml | 7 ------ 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/New_College.Api/Controllers/Front/PcVolunteerController.cs b/New_College.Api/Controllers/Front/PcVolunteerController.cs index 826ec46..90dd145 100644 --- a/New_College.Api/Controllers/Front/PcVolunteerController.cs +++ b/New_College.Api/Controllers/Front/PcVolunteerController.cs @@ -369,17 +369,17 @@ namespace New_College.Api.Controllers.Front /// /// /// - [AllowAnonymous] - [HttpGet("downloadpdf")] - public IActionResult DownloadPdf(string url) - { - // 假设pdfBytes是已存在的PDF文件字节流 - byte[] pdfBytes = HelperHtmlConvertPdf.DoHtmlToByte(url); - // 设置响应头,指定Content-Type和文件名 - Response.Headers.Add("Content-Disposition", string.Format("attachment; filename={0}.pdf", DateTime.Now.ToString("MMddHHmmssfff"))); - Response.ContentType = "application/pdf"; - return File(pdfBytes, "application/pdf"); - } + //[AllowAnonymous] + //[HttpGet("downloadpdf")] + //public IActionResult DownloadPdf(string url) + //{ + // // 假设pdfBytes是已存在的PDF文件字节流 + // // byte[] pdfBytes = HelperHtmlConvertPdf.DoHtmlToByte(url); + // // 设置响应头,指定Content-Type和文件名 + // Response.Headers.Add("Content-Disposition", string.Format("attachment; filename={0}.pdf", DateTime.Now.ToString("MMddHHmmssfff"))); + // Response.ContentType = "application/pdf"; + // return File(pdfBytes, "application/pdf"); + //} } diff --git a/New_College.Api/New_College.xml b/New_College.Api/New_College.xml index 883646c..859d863 100644 --- a/New_College.Api/New_College.xml +++ b/New_College.Api/New_College.xml @@ -571,13 +571,6 @@ - - - - - - - 获取省市区