You need to sign in to do that
Don't have an account?
Vintara
Detecting when an uploaded exceeds maximum attachment size?
The limit in size for an attachment is 5MB, however when using an apex:inputFile controller the result of attempting to upload a file larger then that is a null object. Is there a way to detect when the file atempting to upload is larger then the limit?
To avoid maximum view state error you can use transient keyword as a prefix with your properties to which you have assigned in <apex:inputfile>
I'm not having issues with the view state. The problem I'm trying to detect is when a file larger then the maximum excepted attachment size is selected. The file just gets nulled in apex when that happens and I cant tell the difference between a file thats too large and no file at all.
Are you able to find any solution for this?
Thanks
http://salesforce.stackexchange.com/questions/24969/large-size-attachment-upload-auto-removed-by-salesforce-is-it-a-bug