I created a page that passes a file from the VF to the Controller. It's working fine, except when the file is bigger I hit the blob limit in the controller.
What I do:
- On the front end I convert the attached file to a string.
- Pass that string to a variable in the controller.
- Then do blob.valueOf() to convert the string to a blob. Then I assign that blob to the attachment.Body.
I was following this article: http://manojjena20.blogspot.com/2015/11/apexinputfile-can-not-be-used-in.html
Now my issue is when I try to attach a bigger file. I get this kind of error:
String length exceeds maximum: 6000000 on the line that convers the string to a blob.
What can I do to assure that bigger files can be converted and uploaded as well?