I've seen a bunch of questions here about how to upload large strings of data using AJAX to PHP, however, in what I've seen, these questions usually ask how to upload strings of around 3MB. I need to upload a much larger string.
In my case, I have a base64
encoded image with around 20 million characters (checked using "theString".length
in JS). I've tried uploading it to the PHP server, but every time I check the value in PHP, it is null.
I have gone into php.ini
and added post_max_size = 100M
and upload_max_filesize = 100M
. I also checked the phpinfo
file to make sure that the changes took place. Still doesn't work. How many MB is a base64
encoded string of this length? What should I do? I heard POST
doesn't have a max upload size? Is this true? Let me know if you need to see some code. By the way, I have tried uploading strings of data that are shorter and they work just fine. The only changing factor is a much longer string.
Thanks in advance!