CKEditor - CKFinder不会在上传图像后自动创建缩略图


CKEditor - CKFinder won't create thumbnail automatically after i upload image

In ckeditor (with ckfinder)

我可以正常上传图片,但是在我点击"浏览器服务器"按钮之前它不会创建缩略图,这意味着我必须使用浏览服务器功能手动创建缩略图。

是否有任何方法(PHP)来定义创建缩略图自动后,我上传的图像?

最后我弄明白了,并测试了代码工作良好。

在ckfinder中查找文件ckfinder/核心/连接器/php/php5/CommandHandler/FileUpload.php

查找代码并更改

if($_imagesConfig->getMaxWidth()>0&&$_imagesConfig->getMaxHeight()>0&&$_imagesConfig->getQuality()>0){
    CKFinder_Connector_CommandHandler_Thumbnail::createThumb($sFilePath, $sFilePath, $_imagesConfig->getMaxWidth(), $_imagesConfig->getMaxHeight(), $_imagesConfig->getQuality(), true);
}

if($_imagesConfig->getMaxWidth()>0&&$_imagesConfig->getMaxHeight()>0&&$_imagesConfig->getQuality()>0){
    CKFinder_Connector_CommandHandler_Thumbnail::createThumb($sFilePath, $sFilePath, $_imagesConfig->getMaxWidth(), $_imagesConfig->getMaxHeight(), $_imagesConfig->getQuality(), true);
    $_thumbnails=$_config->getThumbnailsConfig();
    $thumbFilePath=$sServerDir.'_thumbs/Images/'.$sFileName;
    CKFinder_Connector_CommandHandler_Thumbnail::createThumb($sFilePath, $thumbFilePath, $_thumbnails->getMaxWidth(), $_thumbnails->getMaxHeight(), $_thumbnails->getQuality(), true, $_thumbnails->getBmpSupported());
}

,然后它会创建拇指文件,每次你完成上传的图像