3

在 CKFinder 中通过 CKEditor 进行的所有上传都返回消息“无效文件。文件大小太大。” 当它们超过一定大小时,即使我已将最大大小定义为每个我能想到的地方都为 10MB。

/sites/all/modules/ckeditor/ckfinder/config.php
每个资源类型的 maxSize var 设置为 15728640 字节。例如

$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' => '');

我在 /sites/all/modules/ckeditor/ckfinder/plugins/fileeditor/plugin.js 中找到了一个 maxSize var,我也修改了它,但运气不好。

phpinfo() 显示以下相关设置:
post_max_size: 20M
upload_max_filesize: 10M

对于 10MB 的上传,这两者都应该没问题。

我还能改变什么来解决这个问题?!

4

2 回答 2

0

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)

于 2011-03-29T13:38:33.557 回答
0

你看过: admin/settings/uploads 吗?那里有一些最大文件大小设置。

于 2011-03-26T16:38:55.433 回答