+ Start a Discussion

File Attachment Size



Having trouble calculating the attachment file size. I am building case submission VF page. The page supports two attachment. I would like to limit the size on attachment.




1) Is there any way I can find total size of attachment file before creating case ?

2) When I try to create case record w/ attachment size more than 3mb, the call is going to fail and I will get runtime exception. Is there any way I can catch the exception and ask the user to submit a smaller size attachment ?


Any thoughts ?


Thanks in Advance


The file size property will return the actual size only after processing on server side, which would trigger an exception because the file size is not within governance limit.


Make sense ?


The goal is to avoid exception. Any way we can avoid that ?



jaya sai prasadjaya sai prasad

you have a problem with the email attachment size ,then please check this native salesforce application MassMailer DOCS.
MassMailer DOCS let’s you easily mass email attachments to your leads or contacts while securely storing your files with Rackspace Cloud Files.

You can try this app by installing from appexchange  -Massmailer Docs

You can learn more details about the product on this website - docs.massmailer.io