如何使用 CKFinder 更改 Drupal CKEditor 模块的最大上传大小?

发布于 2024-10-26 21:14:54 字数 1037 浏览 5 评论 0原文

通过 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 的上传来说,这两个值都应该没问题。

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

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: 10M

Both of which should be fine for 10MB uploads.

What else can I change to fix this?!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

孤云独去闲 2024-11-02 21:14:54

您是否查看过:管理/设置/上传?那里有一些最大文件大小设置。

Have you looked at: admin/settings/uploads ? There're some max file size settings there.

千笙结 2024-11-02 21:14:54

事实证明这是我的托管设置的问题。在绝望中,我向网络主机发送了电子邮件寻求想法,尽管我的 phpinfo() 正确地报告了这些变量,但他们告诉我:

您之前遇到问题是因为
你没有设置suPHP
.htaccess 中的配置路径
文件。我们现在已经添加了 suPHP 路径
到 .htaccess 文件。

我不太明白,但现在它可以工作了,Drupal 设置本身不需要改变。感谢大家的帮助。 (作为参考,这是 http://canadianwebhosting.com

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)

花心好男孩 2024-11-02 21:14:54

我想也许如果文件大小只是 10mb 多一点点,而你没有注意到它,那就是它被标记下来的原因。尝试增加设置
帖子最大大小:12M
upload_max_filesize: 12M

另请注意,如果 upload_max_filesize < post_max_size ,则上传的最大文件大小是 upload_max_filesize 指定的,

如果 upload_max_filesize > ; post_max_size ,则上传的最大文件大小为 post_max_size 指定的值。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文