← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13409: Minor

 

------------------------------------------------------------
revno: 13409
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-12-23 17:29:56 +0100
message:
  Minor
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SvgConversionController.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SvgConversionController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SvgConversionController.java	2013-10-22 15:52:38 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/SvgConversionController.java	2013-12-23 16:29:56 +0000
@@ -61,7 +61,7 @@
     public void toPng( @RequestBody String svg, @RequestParam( required = false ) String filename, HttpServletResponse response )
         throws Exception
     {
-        String name = filename != null ? CodecUtils.filenameEncode( filename ) : "file.png";
+        String name = filename != null ? ( CodecUtils.filenameEncode( filename ) + ".png" ) : "file.png";
 
         contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_PNG, CacheStrategy.NO_CACHE, name, true );        
         
@@ -72,7 +72,7 @@
     public void toPdf( @RequestBody String svg, @RequestParam( required = false ) String filename, HttpServletResponse response )
         throws Exception
     {
-        String name = filename != null ? CodecUtils.filenameEncode( filename ) : "file.pdf";
+        String name = filename != null ? ( CodecUtils.filenameEncode( filename ) + ".pdf" ) : "file.pdf";
 
         contextUtils.configureResponse( response, ContextUtils.CONTENT_TYPE_PDF, CacheStrategy.NO_CACHE, name, true );