This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch release24.09
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/release24.09 by this push:
     new db0be17b20 Fixed: Bug persisting uploaded files with service 
attachUploadToDataResource (OFBIZ-13191)
db0be17b20 is described below

commit db0be17b2011e336d919c90fc389313c90544b12
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Fri Dec 6 16:12:57 2024 +0100

    Fixed: Bug persisting uploaded files with service 
attachUploadToDataResource (OFBIZ-13191)
    
    It's broken by OFBIZ-11469 in 2021 (Minilang to Groovy migration) so no 
need to
    backport in 18.12
---
 .../groovy/org/apache/ofbiz/content/data/DataServicesScript.groovy | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git 
a/applications/content/src/main/groovy/org/apache/ofbiz/content/data/DataServicesScript.groovy
 
b/applications/content/src/main/groovy/org/apache/ofbiz/content/data/DataServicesScript.groovy
index 346068d6b9..a01527db53 100644
--- 
a/applications/content/src/main/groovy/org/apache/ofbiz/content/data/DataServicesScript.groovy
+++ 
b/applications/content/src/main/groovy/org/apache/ofbiz/content/data/DataServicesScript.groovy
@@ -18,15 +18,14 @@
 */
 package org.apache.ofbiz.content.data
 
+import java.sql.Timestamp
+
 import org.apache.ofbiz.base.util.UtilDateTime
 import org.apache.ofbiz.base.util.UtilProperties
-import org.apache.ofbiz.content.data.DataResourceWorker
 import org.apache.ofbiz.entity.GenericValue
 import org.apache.ofbiz.service.ModelService
 import org.apache.ofbiz.service.ServiceUtil
 
-import java.sql.Timestamp
-
 //Methods for DataResource
 /**
  * Create a Data Resource
@@ -140,7 +139,7 @@ Map getElectronicText() {
  */
 Map attachUploadToDataResource() {
     boolean isUpdate = false
-    boolean forceLocal = UtilProperties.getPropertyValue('content.properties', 
'content.upload.always.local.file')
+    boolean forceLocal = 
UtilProperties.getPropertyAsBoolean('content.properties', 
'content.upload.always.local.file', true)
     List validLocalFileTypes = [
         'LOCAL_FILE',
         'OFBIZ_FILE',

Reply via email to