2023-02-20 001 焊接修改
This commit is contained in:
@@ -104,15 +104,19 @@ namespace BLL
|
||||
{
|
||||
string url = Funs.RootPath + filePah.Replace('/', '\\');
|
||||
FileInfo info = new FileInfo(url);
|
||||
long fileSize = info.Length;
|
||||
System.Web.HttpContext.Current.Response.BufferOutput = true;
|
||||
System.Web.HttpContext.Current.Response.Clear();
|
||||
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
|
||||
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
System.Web.HttpContext.Current.Response.TransmitFile(url, 0, fileSize);
|
||||
System.Web.HttpContext.Current.Response.Flush();
|
||||
System.Web.HttpContext.Current.Response.Close();
|
||||
if (info.Exists)
|
||||
{
|
||||
long fileSize = info.Length;
|
||||
System.Web.HttpContext.Current.Response.BufferOutput = true;
|
||||
System.Web.HttpContext.Current.Response.Clear();
|
||||
System.Web.HttpContext.Current.Response.ContentType = "application/x-zip-compressed";
|
||||
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
|
||||
System.Web.HttpContext.Current.Response.AddHeader("Content-Length", fileSize.ToString());
|
||||
System.Web.HttpContext.Current.Response.TransmitFile(url, 0, fileSize);
|
||||
System.Web.HttpContext.Current.Response.Flush();
|
||||
System.Web.HttpContext.Current.Response.Close();
|
||||
}
|
||||
|
||||
}
|
||||
catch (System.Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user