2

I have a Trigger written on ContentDocumentLink, which validates file attached on Opportunity. If there are any errors then we are using addError() in the Trigger to display those errors. On UI it is working fine, When I am attaching an invalid File on the Opportunity, it is giving proper error message from addError. But when I am using lightning-file-upload tag from LWC, it is not showing me error message from addError(), instead it always shows me generic error message : Can't upload file abc.txt.

Is there any way that we can override this error and show the addError message during the file upload?

1 Answer 1

2

No, you can't override the message. If you need more customization options, you'll need to write your own component.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .