I am trying to upload/attach files to a record using the lightning tag 'lightning:fileUpload'.
I have used this tag inside a component and used the component inside an App
It works fine when launching the app via the lightning UI and in communities. But it throws a weird error on salesforce1. The file gets attached to the record but it throws this error
My component is pretty straight forward.
<lightning:fileUpload name="fileUploader"
label= "Demo Upload"
multiple="{!v.multiple}"
accept="{!v.accept}"
disabled="{!v.disabled}"
recordId="001g000001y6hAR"
onuploadfinished="{! c.handleUploadFinished }"/>
Controller
handleUploadFinished: function (cmp, event) {
// Get the list of uploaded files
var uploadedFiles = event.getParam("files");
alert("Files uploaded : " + uploadedFiles.length);
}
Error screen shot
I did read in the documentation that this tag does not support standalone apps and the component will appear as disabled. But this seems to be working except in Salesforce1.
https://developer.salesforce.com/docs/component-library/bundle/lightning:fileUpload/documentation
tan app page
alsoSalesforce2
, and what do you mean bySalesforce1
(is this the salesforce android or iphone app?). can you please explain how and where do you put this component