Problem if max upload size less than 2M
-
in addgallery.php, there is this line:
<?php echo min((floor( wp_max_upload_size() * 0.99 / 1024 / 1024 ) – 1), 8); ?>Mb
It feeds a javascripts for Plupload based upload (the flash plugin multiple files upload) in FLAgallery. The code above verifies if the files the user is adding to the uploading queue are within limits of upload_max_filesize (a global setting in php.ini)
If you are on shared hosting, you have no control over upload_max_filesize. If your hosting provider has left it to some default size, which seems to be 2 MB, you will *not* be able to upload any file at all, no matter how small.
The effect: you are choosing local files to upload in FLAgallery: Manage galleries — choose gallery — button “Switch to Plupload based upload” — Add images — Add files — select file(s) — click Open
At this moment, you will get a JS pop-up “File too large.”. When you close it, a similar error is shown on the page in the space below file queue pane.
The reason? Evaluate the result of the expression above with 2M (which according to a function in wp-content/media.php) is equal to 2097152 bytes.
The expression result is 0, i.e. your max upload fie size is zero!
- The topic ‘Problem if max upload size less than 2M’ is closed to new replies.