I am using this file uploader plugin, which uses javascript's FileReader API to read files and put them in input elements as base64 strings. Those files could be up to 5mb, so the base64 strings could become quite long.
Anyway, at first everything seems to be working correctly: I can select a file and inspect my hidden input's content, and the base64 string is equal to what I can obtain by using the base64 command on my linux machine: base64 file.pdf > file.b64
.
The problem is that, when I post the form, the string gets truncated after 524261 characters, missing the last 50000 chars (more or less). Which means that the file is corrupt.
I have tried changing some php setting (through the .htaccess file), but it's still not working, and honestly I can't figure out what the problem could be...
upload_max_filesize = 10M
post_max_size = 10M