function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Marco Parisi 2Marco Parisi 2 

Issues using lightning file:Upload

Hi, 

I am relatively new to lightning and front-end development in general. I am trying to use lightning:fileUpload in a case creation form instead of a custom solution implemented before (the old one has the same design as described here: http://peterknolle.com/file-upload-lightning-component/), but I have encountered some issues.

We have a custom lightning component which opens inside a modal when "Create New Case" button is clicked. The form is the one in the picture, encircled in red there is lightnind:fileUpload file selector and this one below is the tag-related code:
<fieldset class="slds-form--compound">
                <legend class="slds-form-element__label">Attachments</legend>   
                <div class="form-element__group">
                       <lightning:fileUpload label="Add attachment" 
                                             multiple="{!v.multiple}" 
                                             recordId="{!v.recordId}" 
                                             onuploadfinished="{!c.handleUploadFinished}" />
                </div>
 </fieldset>


Custom Case Creation Form

The main issue is that when I choose the file to upload, this modal shows up behind the case modal:
Lightning:fileUpload Modal
 
I couldn't find a way to change this behavior using CSS (z-index) and I am not even sure it is the right way to go.
Is there any way to control lightning:fileUpload behaviour, maybe auto-closing the modal after the file has been uploaded?
Thanks!
 
Krish GambhirKrish Gambhir
Have you found the solution to this?
Deepali KulshresthaDeepali Kulshrestha
 Hi Marco,
 Greetings to you!
 Please refer to these links: to solve lightning file: Upload issues.
http://sfdcmonkey.com/2017/09/25/file-upload-lightning-component/
 
I hope you find the above solution helpful. If it does, please mark as Best Answer to help others too.


Thanks and Regards,
Deepali Kulshrestha
www.kdeepali.com