1

I had created a lightning component to upload multiple files with the help of this URL how to create upload multiple file url

which is working fine in action button but when I try to call that component in my VF page having the issue of Lightning out App error in callback function

To use the lightning component in VF page I follow this URL:- how to call component in VF page

and here is my vf page code:-

<apex:includeLightning />
<div id="fileMultiContainer" />
<script>
    $Lightning.use("c:UploadFileApplication", function() {
      $Lightning.createComponent("c:UploadFile",
          {},
          "fileMultiContainer",
           function(cmp) {
               component.set("v.recordId",'{!order.Id}');
            });
     });
 </script>

Can someone please help me where I did wrong.

| improve this question | | | | |
3

Documentation: Usage Considerations

This component is not supported in Lightning Out or standalone apps, and displays as a disabled input. Additionally, if the Don't allow HTML uploads as attachments or document records security setting is enabled for your organization, the file uploader cannot be used to upload files with the following file extensions: .htm, .html, .htt, .htx, .mhtm, .mhtml, .shtm, .shtml, .acgi, .svg. For more information, see Upload and Share Files in Salesforce Help.

In short, below are not allowed:

  1. Don't allow HTML uploads as attachments or document records security setting

  2. Lightning Out or standalone apps - is not supported

You are using lightning out and so will not work

| improve this answer | | | | |
0

lightning:fileUpload base component will not work in lightning out app, it is supported only in Lightning Experience, Lightning Communities, Salesforce Mobile App.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.