You need to sign in to do that
Don't have an account?
Ming Ma
Winter 18' lightning:fileUpload Access Check Failed! AuraComponentService.createComponentFromConfig()
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);
}
})
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);
}
})
Have you ever solved thid issue?
We have encountered the same problem.
We could use some advices from you.
Ben Tang
It turned out that "This component is not supported in Lightning Out or standalone apps, and displays as a disabled input."
https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/aura_compref_lightning_fileUpload.htm
So it only works inside salesforce does not work in standalone apps.
I ended up using this code: http://peterknolle.com/file-upload-lightning-component/
Hope this help.
Ming
Thanks so much for the quick response. It is very helpful.
Ben