nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcgil...@apache.org
Subject incubator-nifi git commit: NIFI-237: - Adding .png extension when appropriate.
Date Thu, 08 Jan 2015 19:31:18 GMT
Repository: incubator-nifi
Updated Branches:
  refs/heads/develop bda9985d6 -> cb2ceeab7


NIFI-237:
- Adding .png extension when appropriate.

Project: http://git-wip-us.apache.org/repos/asf/incubator-nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-nifi/commit/cb2ceeab
Tree: http://git-wip-us.apache.org/repos/asf/incubator-nifi/tree/cb2ceeab
Diff: http://git-wip-us.apache.org/repos/asf/incubator-nifi/diff/cb2ceeab

Branch: refs/heads/develop
Commit: cb2ceeab796ac935441f6f3e288ef96b587bbc3b
Parents: bda9985
Author: Matt Gilman <matt.c.gilman@gmail.com>
Authored: Thu Jan 8 12:54:58 2015 -0500
Committer: Matt Gilman <matt.c.gilman@gmail.com>
Committed: Thu Jan 8 12:54:58 2015 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/nifi/web/servlet/ConvertSvg.java      | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-nifi/blob/cb2ceeab/nar-bundles/framework-bundle/framework/web/nifi-web-ui/src/main/java/org/apache/nifi/web/servlet/ConvertSvg.java
----------------------------------------------------------------------
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 163f20b..6282f41 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);


Mime
View raw message