You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ha...@apache.org on 2008/11/06 19:46:48 UTC
svn commit: r711938 -
/ofbiz/trunk/applications/content/src/org/ofbiz/content/view/SimpleContentViewHandler.java
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) {