本文介绍了CKFinder“编辑”功能在不同的域上工作时不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在评估CKFinder,目前我们遇到这种情况:

We are evaluating CKFinder, at the moment we have this situation:


  • app .domain.com托管我们的JS应用程序包含ckfinder.js

  • api .domain.com托管connector.php

  • app.domain.com hosts our JS application included ckfinder.js
  • api.domain.com hosts the connector.php

请注意,他们在不同的网域。

Please note they are on different domains.

我们可以查看文件和文件夹没有问题。

We are able to view files and folders with no problems.

问题与编辑功能有关。当用户选择图像并点击编辑按钮时,CKFinder进入编辑模式,但收到错误,图像无法编辑:

The issue is related the EDIT feature. When user select an Image and click "Edit" Button, CKFinder goes in editing mode but with receive an error and the image cannot be edited:

response (status cancelled)
URL:about:/blank?camanProxyUrl=https%3A%2F%2Fapp.domain.com%2Flib%2Fckfinder%2Fcore%2Fconnector%2Fphp%2Fconnector.php%3Fcommand%3DThumbnail%26lang%3Den%26type%3DImages%26currentFolder%3D%252F%26hash%3D7c47bbd7d0c05357%26fileName%3Dfile-aaa-Image-Sample-6.jpg%26date%3D20160208110210%26fileSize%3D206

它看起来像一个php代理CKFinder使用的问题。

It looks like an issue with some php proxy CKFinder is using.

可能与此组件相关:

我们需要取消编辑功能,但保留

We would need to run the EDIT feature but keeping the same domain organization as we have.

任何解决方案都是非常受欢迎的感谢!

Any solution is very welcome thanks!

推荐答案

一般来说,目前CKFinder不支持跨域设置。就像这样, ckfinder.js connector.php 应位于同一个域中。请注意,这不仅仅是黑客编辑功能的问题,应用程序的其他方面,包括一些安全相关的也不会工作。

In general, cross-domain setups are not supported in CKFinder at the moment. As it is, ckfinder.js and connector.php should be located in the same domain. Do note it's not just a matter of hacking the Edit feature, other areas of the application including some security-related ones will not work either.

这篇关于CKFinder“编辑”功能在不同的域上工作时不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-10 18:59