All uploads made through CKEditor in CKFinder return the message "Invalid file. The file size is too big." when they exceed a certain size, even though I have defined the maximum size to 10MB every place I can think of.
/sites/all/modules/ckeditor/ckfinder/config.php
Every resource type has their maxSize var set to 15728640 bytes. e.g.$config['开发者_如何学编程ResourceType'][] = Array(
'name' => 'Files', // Single quotes not allowed
'url' => $baseUrl . 'files',
'directory' => $baseDir . 'files',
'maxSize' => '10M',
'allowedExtensions' => '7z,aiff,asf,avi,bmp,csv,doc,docx,fla,flv,gif,gz,gzip,jpeg,jpg,mid,mov,mp3,mp4,mpc,mpeg,mpg,ods,odt,pdf,png,ppt,pptx,pxd,qt,ram,rar,rm,rmi,rmvb,rtf,sdc,sitd,swf,sxc,sxw,tar,tgz,tif,tiff,txt,vsd,wav,wma,wmv,xls,xlsx,zip',
'deniedExtensions' => '');
I found a maxSize var in /sites/all/modules/ckeditor/ckfinder/plugins/fileeditor/plugin.js as well which I have modified, no luck.
phpinfo() shows the following relevant settings:
post_max_size: 20M upload_max_filesize: 10MBoth of which should be fine for 10MB uploads.
What else can I change to fix this?!
Have you looked at: admin/settings/uploads ? There're some max file size settings there.
So it turns out that this was a problem with my hosting settings. In an act of desperation, I e-mailed the web host for ideas, and although my phpinfo() was reporting those variables correctly, they told me this:
You were having issues earlier because you had not set the suPHP configuration path in the .htaccess file. We have now added the suPHP path to the .htaccess file.
I don't quite understand, but now it works, it was nothing to change in the Drupal setup itself. Thanks for the help everyone. (for reference, this is with http://canadianwebhosting.com)
I think maybe if the file size is just a teeeny weeeeny bit more of 10mb and you havent noticed it, thats why it gets flagged down. Try increasing the settings of post_max_size: 12M upload_max_filesize: 12M
also note that if upload_max_filesize < post_max_size , then max file size for upload is the one specified by upload_max_filesize
if upload_max_filesize > post_max_size , then max file size for upload is the one specified by post_max_size.
精彩评论