Can we customize enable and disable middleware filter?
-
Can we customize enable and disable middleware filter [MiddlewareFilter(typeof(JsReportPipeline))] this filter on this method.
[MiddlewareFilter(typeof(JsReportPipeline))] public ActionResult Invoice() { HttpContext.JsReportFeature().Recipe(Recipe.ChromePdf); return View(InvoiceModel.Example()); }```
-
I have one IActionMethod where I want download PDF and View PDF when I use
[MiddlewareFilter(typeof(JsReportPipeline))]
on then view pdf success render and download is not work. when I remove filter[MiddlewareFilter(typeof(JsReportPipeline))]
then view is not working and downloading is working well. Please Give me any Suggestion.
-
Not sure If I get your question...
Do you need to dynamically disable the filter from inside the action body?
TheJsReportFeature
hasEnabled
property
https://github.com/jsreport/jsreport-dotnet-aspnetcore/blob/1a18b8cb2141fe83ee3bfb6726ab0b199eef6ecf/jsreport.AspNetCore/JsReportFeature.cs#L34