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.

    评论

报告相同问题?

悬赏问题

  • ¥100 求数学坐标画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站