Author: jaz
Date: Mon Mar 3 12:43:29 2008
New Revision: 633269
URL:
http://svn.apache.org/viewvc?rev=633269&view=revLog:
added code to force a system wide default to store uploaded content on the file system instead of DB tables (usually this is a good idea)
Modified:
ofbiz/trunk/applications/content/config/content.properties
ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml
Modified: ofbiz/trunk/applications/content/config/content.properties
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/config/content.properties?rev=633269&r1=633268&r2=633269&view=diff==============================================================================
--- ofbiz/trunk/applications/content/config/content.properties (original)
+++ ofbiz/trunk/applications/content/config/content.properties Mon Mar 3 12:43:29 2008
@@ -35,6 +35,7 @@
# user level content uploading (relative to ofbiz.home)
content.upload.path.prefix=runtime/uploads
content.upload.max.files=250
+content.upload.always.local.file=true
# content output folder (relative to ofbiz.home)
content.output.path=runtime/output
Modified: ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml?rev=633269&r1=633268&r2=633269&view=diff==============================================================================
--- ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml (original)
+++ ofbiz/trunk/applications/content/script/org/ofbiz/content/data/DataServices.xml Mon Mar 3 12:43:29 2008
@@ -539,6 +539,11 @@
<simple-method method-name="attachUploadToDataResource" short-description="Attach an uploaded file to a data resource">
<set field="isUpdate" value="false"/>
+ <property-to-field resource="content.properties" property="content.upload.always.local.file" field-name="forceLocal"/>
+ <if-compare field-name="forceLocal" value="true" operator="equals">
+ <set field="parameters.dataResourceTypeId" value="LOCAL_FILE"/>
+ </if-compare>
+
<if-empty field-name="parameters.dataResourceTypeId">
<!-- create default behavior -->
<if>