From cb2ceeab796ac935441f6f3e288ef96b587bbc3b Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Thu, 8 Jan 2015 12:54:58 -0500 Subject: [PATCH] NIFI-237: - Adding .png extension when appropriate. --- .../src/main/java/org/apache/nifi/web/servlet/ConvertSvg.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/java/org/apache/nifi/web/servlet/ConvertSvg.java b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/java/org/apache/nifi/web/servlet/ConvertSvg.java index 163f20b5ed..6282f412bc 100644 --- a/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/java/org/apache/nifi/web/servlet/ConvertSvg.java +++ b/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/java/org/apache/nifi/web/servlet/ConvertSvg.java @@ -81,6 +81,8 @@ public class ConvertSvg extends HttpServlet { String filename = request.getParameter("filename"); if (filename == null) { filename = "image.png"; + } else if (!filename.endsWith(".png")) { + filename += ".png"; } final StringReader reader = new StringReader(svg);