I'm trying to make a trigger that prevents the user from uploading a file that is larger than 100mb. I'm doing this by checking the file size in the ContentVersion trigger and using addError.
However, when the error appears on the front end, it just contains the default error message, "Can't upload myfile.zip". I can't get it to show a different error message. (I also tried throwing an exception instead of using addError, but the result is the same.)
Does anyone happen to know if it's possible to change the error message in this situation? Or will any error related to file uploading always result in this default error message?