在使用带有 Ckfinder 的 ckeditor 中,我可以正常上传图像,但在我单击“浏览服务器”按钮之前,它不会创建缩略图,这意味着我必须使用浏览服务器功能手动创建缩略图。
是否有(PHP)的方法可以在上传图像后自动定义创建缩略图?
是否有(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());
}