Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

跨域环境下图片上传成功, 客气端json返回成功, 但是客户端却提示上传失败。 #61

Open
z448401921 opened this issue Dec 26, 2017 · 6 comments

Comments

@z448401921
Copy link

qq 20171226165813

@Weipengzhou
Copy link

同样遇到这个问题,多图上传没毛病,但是单图就会提示上传错误,但是有返回值,本地可以存上图片。

@xian107
Copy link

xian107 commented Jun 1, 2018

前台在哪里设置action

@60late
Copy link

60late commented Aug 2, 2018

同样遇到这个问题,mark一下

@zhuzhengjing
Copy link

在同一个域名下吗?我存在跨域问题,配置文件config.json下发不到client端。
感觉这个组件设计不合理,配置文件都放在client端不是挺好吗?非要从服务器端获取。
另外客户端上传文件使用标准方法不是挺好的?定义好API接口,官方非要搞了几个不伦不类的后台程序。

@ttiantianle
Copy link

怎么解决的老哥

@xw-ASample
Copy link

通过回调地址解决 跨域的问题
image

步骤
1、在你的客户端创建一个用户回调的空白页面即可,如我创建的是UEditorCallback.html 或者 UEditorCallback.cshtml。
2、在你的ueditor.config.js中 配置serverUrl ,如上图所示。
3、后台也需要进行小小的改动,如下图
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants