• Analytics Einstein
  • NEWBIE
  • 0 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi,
I am having some issue with the new lightning:fileUpload (Beta) (in Winter 18').

I created a test Lightning App and put a lightning:fileUpload on it. I used sample code from lightning documentation: https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_fileUpload.htm

When uploading a file, I am getting an error: 
This page has an error. You might just need to refresh it. Access Check Failed! AuraComponentService.createComponentFromConfig(): 'markup://forceContent:fileUploadAction' is not visible to 'markup://c:TestHarnessApp {1:0}'. Failing descriptor: {c:TestHarnessApp}

Does anyone know how to fix this issue? Thanks.

Here is the code for
TestHarnessApp.app
<aura:application >
    <aura:attribute name="myRecordId" type="String" description="Record to which the files should be attached"/>
    <h1>Test File Upload</h1>
    <lightning:fileUpload label="Attach receipt" multiple="true" accept=".pdf, .png, .jpg" recordId="0030l000004KVpWAAW" onuploadfinished="{!c.handleUploadFinished}" />
</aura:application>


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

Error