[jira] [Commented] (OFBIZ-10746) Error while uploading file in Ecommerce Profile's File Manager

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

[jira] [Commented] (OFBIZ-10746) Error while uploading file in Ecommerce Profile's File Manager

Nicolas Malin (Jira)

    [ https://issues.apache.org/jira/browse/OFBIZ-10746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17096820#comment-17096820 ]

Jacques Le Roux commented on OFBIZ-10746:
-----------------------------------------

Does not seem to be the issue. I tried with
{code:java}
diff --git ecommerce/template/customer/ViewProfile.ftl ecommerce/template/customer/ViewProfile.ftl
index 5846d2d..d9ce512 100644
--- ecommerce/template/customer/ViewProfile.ftl
+++ ecommerce/template/customer/ViewProfile.ftl
@@ -465,10 +465,20 @@
         <input type="hidden" name="statusId" value="CTNT_PUBLISHED"/>
         <input type="hidden" name="roleTypeId" value="OWNER"/>
         <label class="mr-2">${uiLabelMap.EcommerceUploadNewFile}</label>
-        <label class="custom-file mr-2">
-          <input type="file" name="uploadedFile" class="custom-file-input"/>
+        <div class="custom-file mr-2">
+          <input type="file" name="uploadedFile" class="custom-file-input" id="customFile" required/>
           <label class="custom-file-label" for="customFile">Choose file</label>
-        </label>
+          <div class="invalid-feedback">Example invalid custom file feedback</div>
+        </div>
+        <script>
+            $('#customFile').on('change',function(){
+                //get the file name
+                var fileName = $(this).val();
+                fileName = fileName.replace('C:\\fakepath\\', " ");
+                //replace the "Choose a file" label
+                $(this).next('.custom-file-label').html(fileName);
+            })
+        </script>        
         <select name="partyContentTypeId" class="custom-select mr-2">
           <option value="">${uiLabelMap.PartySelectPurpose}</option>
           <#list partyContentTypes as partyContentType>
{code}
to no avail. But as I don't know Boostrap at all, there is maybe something that escapes me.

> Error while uploading file in Ecommerce Profile's File Manager
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-10746
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10746
>             Project: OFBiz
>          Issue Type: Bug
>          Components: ecommerce
>    Affects Versions: Trunk
>            Reporter: Aishwary Shrivastava
>            Priority: Major
>         Attachments: ErroUploadingFileOnFileManagerEcommerce.png
>
>
> On uploading File in Ecommerce Profile's File Manager,
> "The following required parameter is missing: [IN] [uploadPartyContentFile.partyContentTypeId]" error is displaying.
>  
> Steps to regenerate the issue:
>  # Open Ecommerce on Ofbiz.
>  # Login with any user.
>  # Go to Profile.
>  # Navigate down to File Manager.
>  # Select Purpose.
>  # Seletct Mime Type
>  # Click upload.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)