svn commit: r711938 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r711938 - /ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java

hansbak-2
Author: hansbak
Date: Thu Nov  6 10:46:43 2008
New Revision: 711938

URL: http://svn.apache.org/viewvc?rev=711938&view=rev
Log:
show the original filename for display

Modified:
    ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java

Modified: ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java?rev=711938&r1=711937&r2=711938&view=diff
==============================================================================
--- ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java (original)
+++ ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java Thu Nov  6 10:46:43 2008
@@ -143,8 +143,11 @@
 
             // setup content type
             String contentType2 = UtilValidate.isNotEmpty(mimeTypeId) ? mimeTypeId + "; charset=" +charset : contentType;
-
-            UtilHttp.streamContentToBrowser(response, bais, byteBuffer.limit(), contentType2);
+            String fileName = null;
+            if (!UtilValidate.isEmpty(dataResource.getString("dataResourceName"))) {
+             fileName = dataResource.getString("dataResourceName");
+            }
+            UtilHttp.streamContentToBrowser(response, bais, byteBuffer.limit(), contentType2, fileName);
         } catch(GenericEntityException e) {
             throw new ViewHandlerException(e.getMessage());
         } catch(IOException e) {