From dc26fbd37d7f88aabeef3cd982089c7a937a2b72 Mon Sep 17 00:00:00 2001 From: cmurialdo Date: Tue, 6 Jun 2023 22:46:59 -0300 Subject: [PATCH] Condition content-disposition=inline; filename to reports only. --- .../GxClasses/Model/GXWebProcedure.cs | 23 ++++++++----------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/dotnet/src/dotnetframework/GxClasses/Model/GXWebProcedure.cs b/dotnet/src/dotnetframework/GxClasses/Model/GXWebProcedure.cs index 1158593e8..ad7871941 100644 --- a/dotnet/src/dotnetframework/GxClasses/Model/GXWebProcedure.cs +++ b/dotnet/src/dotnetframework/GxClasses/Model/GXWebProcedure.cs @@ -18,7 +18,6 @@ public class GXWebProcedure : GXHttpHandler protected IReportHandler oldReportHandler; string outputFileName; string outputType; - bool fileContentInline; protected int lineHeight; protected int Gx_line; @@ -116,20 +115,17 @@ protected override void sendCacheHeaders() private void setOuputFileName() { - if (fileContentInline) + string fileName = GetType().Name; + string fileType = "pdf"; + if (!string.IsNullOrEmpty(outputFileName)) { - string fileName = GetType().Name; - string fileType = "pdf"; - if (!string.IsNullOrEmpty(outputFileName)) - { - fileName = outputFileName; - } - if (!string.IsNullOrEmpty(outputType)) - { - fileType = outputType.ToLower(); - } - context.HttpContext.Response.AddHeader(HttpHeader.CONTENT_DISPOSITION, $"inline; filename={fileName}.{fileType}"); + fileName = outputFileName; + } + if (!string.IsNullOrEmpty(outputType)) + { + fileType = outputType.ToLower(); } + context.HttpContext.Response.AddHeader(HttpHeader.CONTENT_DISPOSITION, $"inline; filename={fileName}.{fileType}"); } public virtual int getOutputType() @@ -141,7 +137,6 @@ protected bool initPrinter(String output, int gxXPage, int gxYPage, String iniFi string idiom; if (!Config.GetValueOf("LANGUAGE", out idiom)) idiom = "eng"; - fileContentInline = true; #if NETCORE setOuputFileName(); #endif