0

I have create a file upload wizard (using lightning:input type="file") in which am trying to upload file upto 5MB. Am able to successfully upload file till 2.8MB but not sure after that am getting Error: Received exception event aura:systemError from server .

Note: I can not reduce the size it can go till 10 MB.

The worst part is am not getting any logs from the class which am hitting yo save the files. so this means is it getting error out in between.

Any help or thought on the same !!!! Please share...

2
1

The maximum payload for Aura/LWC is 4 MB. Files are uploaded in Base-64 encoded format, which limits the file to about 3 MB in total (minus protocol overhead for calling a server method). Depending on what you're trying to do, you'll need to either upload the file in chunks, or use client-side processing to deal with the file. For now, if you need to deal with large files, a Visualforce page should probably be used to allow direct API access with the much larger limits allowed by the API.

5
  • Totally agree, any thoughts on scenario in which user wants to take photos using his iphone camera, which usually create the photo size in >2MB. How can we make sure that this error does not come. Or is there any different file upload component should be created. – user3012372 Dec 16 '20 at 15:22
  • @user3012372 lightning-file-upload can upload files up to 2GB. – sfdcfox Dec 16 '20 at 15:27
  • I'm having the same problem, but I can't use lightning-file-upload since I need to create versions of my files. Any other solution?? Thanks – Alex Cortes May 11 at 17:14
  • @AlexCortes Not that I know of, unfortunately. You may want to ask a new question. – sfdcfox May 11 at 18:53
  • Thanks @sfdcfox. Just created a new question. – Alex Cortes May 11 at 19:41

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.