I am loading lightning page through visualforce page. I know Salesforce provides lightning tags for file upload but it does not work when you are loading lightning component through Visualforce page. So I want to upload more than 5MB files through that component and I do not see any way to do that.

  • What is your use case here as why do you need to upload files using Lightning Component? If you are using VF page, then just use the standard file uploads supported in context of VF and use SLDS for styling if required. – Jayant Das Feb 3 '19 at 2:41
  • We are in the middle of transition to lightning. but we are not yet ready. At least for a year and we have stopped doing development in VF. We are strictly developing everything into Lightning component. – salesforcewithfunforce Feb 3 '19 at 3:58

lightning:fileUpload allows you to upload files up to size of 2 GB or less.

The maximum file size you can upload is 2 GB. In Communities, the file size limits and types allowed follow the settings determined by community file moderation.

But you cannot use this component in a Visualforce page using Lightning Out, as the only supported experience for this component are:

  • Lightning Experience
  • Lightning Communities
  • Salesforce Mobile App

Your best option here is to transition to Lightning Experience and utilize this component. But if you cannot migrate to Lightning Experience, then you don't have any other option here other than utilizing apex:inputFile on a Visualforce page which can support file uploads up to 10 MB, with LEX styling using SLDS.

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.