dongqian7545 2019-03-04 16:48
浏览 158

ckfinder 3.4.5 - 上传后是否还会创建缩略图?

I've been using ckeditor4 for ages in my custom CMS and I've just integrated ckfinder3 so I can use drag & drop image uploading via ckeditor4. Everything is working properly and I have it resizing images upon upload (set in ckfinder/config.php) - all good.

My issue is I want it to create a thumbnail of the image too, as it did in the past (I've been using an earlier version of ckfinder). They used to be uploaded to userfiles/_thumbs/images/ but now it doesn't seem to do it.

I have a few custom bits set up for my editor such as a custom config file and custom contents.css but they shouldn't have any effect on this. My editor code from within my CMS is below, all pretty straightforward stuff and it all works except for the fact that uploading images using drag & drop doesn't create a thumbnail too.

A point to note that if clicking on the 'image' button on the ckeditor toolbar, then uploading the usual way - browse server/upload etc, the system does create a thumbnail and places it in the folder here: userfiles/.ckfinder/cache/thumbs/images/theUploadedImage/theUploadedImage.jpg

Any pointers would be gratefully received. I hope this makes sense! Thanks

<textarea name="blog_text"></textarea>
<script>
    CKEDITOR.replace( 'blog_text', {

        customConfig: 'mycustomfolder/myconfig.js',
        contentsCss: CKEDITOR.getUrl( 'mycustomfolder/mycontents.css' ),

        filebrowserBrowseUrl: 'ckfinder3.4.5/ckfinder.html',
        filebrowserImageBrowseUrl: 'ckfinder3.4.5/ckfinder.html?type=Images',
        filebrowserUploadUrl: 'ckfinder3.4.5/core/connector/php/connector.php?command=QuickUpload&type=Files',
        filebrowserImageUploadUrl: 'ckfinder3.4.5/core/connector/php/connector.php?command=QuickUpload&type=Images'

    } );
</script>
  • 写回答

1条回答 默认 最新

  • duanji2002 2019-03-15 11:36
    关注

    The paths and the methods of creating them were chnaged in CKFinder 3. Assuming that you are using default configuration, all thumbnails are being created inside /userfiles/.ckfinder/cache/thumbs/ folder and are on CKFinder private use only. They actually were for private use in CKF 2.x as well but users liked to abuse that.

    Thumbnails get also created if you use, available in Popup and CKEditor integrations, "Choose Scaled" option. In that case scaled image gets created inside /MainFilesFolder/resourceTypeFolder/__thumbs/NameOfImage.extension/NameOfImage__widthxheight.extension e.g. /userfiles/images/__thumbs/Students.jpg/Students__480x320.jpg.

    You can somewhat change the location of private directory through https://ckeditor.com/docs/ckfinder/ckfinder3-php/configuration.html#configuration_options_privateDir but please note that end of path resourceTypeName/theUploadedImage/theUploadedImage.jpg will not change.

    There is also a simple plugin available online which allows generating thumbs on file upload. Perhaps this is something that might suit you or something that can be used as a jump start to create your own custom plugin: https://gist.github.com/zaak/7bb61025bfd9d3a6633029b0b4b087f9.

    评论

报告相同问题?

悬赏问题

  • ¥50 易语言把MYSQL数据库中的数据添加至组合框
  • ¥20 求数据集和代码#有偿答复
  • ¥15 关于下拉菜单选项关联的问题
  • ¥20 java-OJ-健康体检
  • ¥15 rs485的上拉下拉,不会对a-b<-200mv有影响吗,就是接受时,对判断逻辑0有影响吗
  • ¥15 使用phpstudy在云服务器上搭建个人网站
  • ¥15 应该如何判断含间隙的曲柄摇杆机构,轴与轴承是否发生了碰撞?
  • ¥15 vue3+express部署到nginx
  • ¥20 搭建pt1000三线制高精度测温电路
  • ¥15 使用Jdk8自带的算法,和Jdk11自带的加密结果会一样吗,不一样的话有什么解决方案,Jdk不能升级的情况