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"
                       onuploadfinished="{! c.handleUploadFinished }"/>


handleUploadFinished: function (cmp, event) {
    // Get the list of uploaded files
    var uploadedFiles = event.getParam("files");
    alert("Files uploaded : " + uploadedFiles.length);

Error screen shot

enter image description here

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.


  • Try putting this component alone in your salesforce 1 - what happens? Feb 13, 2019 at 8:06
  • Same results..I add the component onto tan app page and then added that app in Salesforce2. Its showing the same error on salesforce1 Feb 14, 2019 at 10:03
  • I don't understand what is tan app page also Salesforce2, and what do you mean by Salesforce1 (is this the salesforce android or iphone app?). can you please explain how and where do you put this component Feb 14, 2019 at 11:11
  • Sorry... that was a typo ...I add the component onto an app page and then added that app in Salesforce1. Its showing the same error on salesforce1. ... By Saleforce1; I meant the Salesforce Mobile app (android iphone app) Feb 14, 2019 at 12:41

1 Answer 1


Can you remove the alert message in your controller and try it?

alert("Files uploaded : " + uploadedFiles.length);

if you like to display as count, then assign the variable and use to dispaly it in your components, rather than to show as a popup alert, sometime mobile is not supporting alert messages.

Please try it and revert your test results.

Thanks & Regards, ​​​​​​​Sakthivel Madesh

  • This is not an answer. It would appropriate to write this in comment. People may down vote your answer as your are not sure about the answer. Feb 13, 2019 at 8:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .