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
<img src=“data:image/jpeg;base64,xxxxxxx…”>
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.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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 upload_max_filesize directive in php.ini.
No, I am not. <br> <br>the script is <br> <br>strPost=‘type=upload&filename=’ +filename+'&encode='encode; <br> <br>function QueryResult(strURL, strPostInfo, callback){ <br> $.ajax({ <br> url:strURL, <br> type:‘POST’, <br> dataType:‘json’, <br> data:{postinfo:strPost}, <br> success:function(json){ <br> if(typeof callback===‘function’)callback(json); <br> }, <br> error:function(data, status, xhr){ <br> alert(data.responseText); <br> } <br> }); <br>}
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.