问题标签 [kcfinder]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
javascript - 从 KCFinder 图像路径中删除 www 文件夹
我正在使用 CKEditor 和 KCFinder 来在 Nette 项目上上传图像和文件。上传完美,但 KCFinder 返回 Web 服务器上的绝对路径而不是 URL。比我得到 www/upload/images/test.jpg 而不是http://mypage.com/upload/images或 /upload/images。
有人知道,请问我在哪里以及如何解决这个问题?
我的 KCFinder config.php 的一部分:
php - KCfinder 如何使用 GLOBAL 变量
我正在将 KCfinder 用于一个项目,但我现在被卡住了。
我想要一个动态的uploadDir,例如:'uploadURL' => $_SESSION['user_upload_dir']
但是,KCfinder 的配置文件不接受任何全局变量。我阅读了文档(https://kcfinder.sunhater.com/integrate#session),但我不知道我必须做什么才能让它工作。(英语不是我的主要语言,所以我很难理解文档要我做什么)
简而言之,我想要这个:
- 用户登录并获得一个
$_SESSION['upload_key']
- 用户要上传图片,由于已经登录,上传目录会变成upload_key: 'uploadURL' => /myuploadkey
原因是网站的多个成员需要有自己的图像文件夹。
感谢所有帮助!:)
javascript - CKEDITOR 和 KCFINDER 上传工作,图像缩略图浏览失败
香草安装CKEDITOR
和KCFINDER
上传工作得很好。我可以从我的计算机中选择一个图像并将其发送到服务器。图像弹出很好CKeditor
。
如果我尝试将图像放入CKeditor
已经存在的图像中,浏览选项会打开kcfinder
,我可以看到列出的所有我已经上传的图像。
问题是图像缩略图不显示(见附图)。我只看到一个列出文件名的空白框。
图像和缩略图在服务器上,我可以选择空白缩略图。将所选图像放入CKeditor
窗口时,实际图像会正确显示。这绝对是关于KCfinder
浏览器内部图像的显示。
有人有想法么?我已经尝试从上传目录中删除 htaccess 文件并禁用_check4htaccess
配置中的选项。问题仍然存在。
添加的配置文件
laravel - 使用 KCFinder 将图像上传到 CKEditor 时,文件上传期间发生 HTTP 错误(404:找不到文件)
我已经在我的 /public 目录中安装了 ckeditor 和 kcfinder。尽管已添加到 /public/ckeditor/config.js:
并在 /public/kcfinder/config.php 中启用 KCFinder
尝试将图像上传到 CKEditor 时出错。
我注意到控制台中有一些错误
php - 调用空 MX/Modules.php 上的成员函数 item() 行号:8 ckeditor 和 kcfinder
我在codeigniter中遇到了ckeditor和kcfinder的问题,当我想浏览这样的图像错误时,我使用了wiredesignz codeigniter-modular-extensions-hmvc中的HMVC
遇到 PHP 错误
严重性:错误
消息:在 null 上调用成员函数 item()
文件名:MX/Modules.php
行号:8
回溯:
当我不使用 HMVC 访问 ckeditor 并从 kcfinder 浏览图像时很好,而使用 HMVC 时很麻烦。我已经在这个 stackoverflow 和谷歌中搜索了参考,但对我来说不是同样的麻烦。我已经在 application/config.php 中声明了
和根文件夹中的配置文件索引
我使用我在文件夹asset/kcfinder/conf/config.php中设置的会话
javascript - Uploading files to local iframe using target attribute not working in newest Chrome
I'm using kcFinder 2.54 to upload files in one of my site through CKEditor. I know that the versions of the scripts are old but they were working fine until recently.
While going through the changelog of Chrome I noticed the following:
The native file system API starts a new origin trial with added functionality
I think it may be a cause of my problems but maybe not. Here is the code:
When kcFinder is initialised, it creates a simple form:
Notice the target="uploadResponse"
, which is a local iframe prepended to the body
of the document:
This is what the uploadFile(this.form)
function looks like :
I've had a go at debugging it and realised that response
is completely empty. Then I realised I'm not surprised since the request has been cancelled:
The only thing I noticed was this header Upgrade-Insecure-Requests: 1
but not sure if that is important since the iframe is totally local.
I've been searching for information about the possible downgrade of target
attribute or the way sending form using iframe works, but to no avail. If anybody experienced something similar or at least can tell me the reason why it's not working, perhaps I can figure out a workaround.
Things I have tried so far:
- Change
javascript:;
tojavasript:false;
in iframe source - Change
javascript:;
to#
in iframe source