Drag and drop upload image file size limit

Posted January 9, 2014 5.6k views
I used to use a web hosting with cPanel and there is no problem with drag and drop image uploading ( every file is less than 2MB ). The uploading method is like and I post it on url into php to encode to a image file. After I moved my website to Digital Ocean VPS web hosting and some problem just happened with drag and drop uploading. If any file size is larger than 730KB, the uploading will be fail. I have google a lot, including modify php.ini like post_max_size, upload_max_filesize, even set ini_set('memory_limit', '256M') and ini_set('post_max_size', '8M') in php file, it's not working at all. please help me to fix this.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
5 answers
Are you using WordPress?
No, I am not.

the script is

strPost='type=upload&filename=' +filename+'&encode='encode;

function QueryResult(strURL, strPostInfo, callback){
if(typeof callback==='function')callback(json);
error:function(data, status, xhr){
I have used JSON, if the file is larger than 730KB, the JSON will return undefined.

Hi Jana, I facing a problem to install the a word press plugin which is more than 2MB.
Can you ping me the code and procedure for increasing the max_filesize directive in php.ini upto 8MB, 10MB or 64MB. I am using digital ocean as my server.

The error mesage is below:

The uploaded file exceeds the uploadmaxfilesize directive in php.ini.