[ofbiz-framework] branch trunk updated: Improved: Unable to upload additional image for a product (OFBIZ-11844)

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

[ofbiz-framework] branch trunk updated: Improved: Unable to upload additional image for a product (OFBIZ-11844)

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/trunk by this push:
     new ebe18e4  Improved: Unable to upload additional image for a product (OFBIZ-11844)
ebe18e4 is described below

commit ebe18e45f1e37567e2ba45dccc404894c01d0f73
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Sun Jun 28 21:48:44 2020 +0200

    Improved: Unable to upload additional image for a product (OFBIZ-11844)
   
    OFBIZ-11436 broke the uploadProductAdditionalViewImages service but something
    else remains which prevents to create a content
   
    Thanks: Arpit Mor for report
---
 .../product/product/ProductContentServices.groovy            | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/applications/product/groovyScripts/product/product/ProductContentServices.groovy b/applications/product/groovyScripts/product/product/ProductContentServices.groovy
index ee69514..36b7299 100644
--- a/applications/product/groovyScripts/product/product/ProductContentServices.groovy
+++ b/applications/product/groovyScripts/product/product/ProductContentServices.groovy
@@ -120,25 +120,29 @@ def uploadProductAdditionalViewImages() {
     if (parameters.additionalImageOne) {
         addAdditionalViewForProductMap.uploadedFile = parameters.additionalImageOne
         addAdditionalViewForProductMap.productContentTypeId = "ADDITIONAL_IMAGE_1"
-        addAdditionalViewForProductMap._uploadedFile_fileName = parameters._additionalImageOne_contentType
+        addAdditionalViewForProductMap._uploadedFile_fileName = parameters._additionalImageOne_fileName
+        addAdditionalViewForProductMap._uploadedFile_contentType = parameters._additionalImageOne_contentType
         run service: "addAdditionalViewForProduct", with: addAdditionalViewForProductMap
     }
     if (parameters.additionalImageTwo) {
         addAdditionalViewForProductMap.uploadedFile = parameters.additionalImageTwo
         addAdditionalViewForProductMap.productContentTypeId = "ADDITIONAL_IMAGE_2"
-        addAdditionalViewForProductMap._uploadedFile_fileName = parameters._additionalImageTwo_contentType
+        addAdditionalViewForProductMap._uploadedFile_fileName = parameters._additionalImageTwo_fileName
+        addAdditionalViewForProductMap._uploadedFile_contentType = parameters._additionalImageTwo_contentType
         run service: "addAdditionalViewForProduct", with: addAdditionalViewForProductMap
     }
     if (parameters.additionalImageThree) {
         addAdditionalViewForProductMap.uploadedFile = parameters.additionalImageThree
         addAdditionalViewForProductMap.productContentTypeId = "ADDITIONAL_IMAGE_3"
-        addAdditionalViewForProductMap._uploadedFile_fileName = parameters._additionalImageThree_contentType
+        addAdditionalViewForProductMap._uploadedFile_fileName = parameters._additionalImageThree_fileName
+        addAdditionalViewForProductMap._uploadedFile_contentType = parameters._additionalImageThree_contentType
         run service: "addAdditionalViewForProduct", with: addAdditionalViewForProductMap
     }
     if (parameters.additionalImageFour) {
         addAdditionalViewForProductMap.uploadedFile = parameters.additionalImageFour
         addAdditionalViewForProductMap.productContentTypeId = "ADDITIONAL_IMAGE_4"
-        addAdditionalViewForProductMap._uploadedFile_fileName = parameters._additionalImageFour_contentType
+        addAdditionalViewForProductMap._uploadedFile_fileName = parameters._additionalImageFour_fileName
+        addAdditionalViewForProductMap._uploadedFile_contentType = parameters._additionalImageFour_contentType
         run service: "addAdditionalViewForProduct", with: addAdditionalViewForProductMap
     }
     result.productId = parameters.productId