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

上传图片问题 #57

Closed
attsion opened this issue Apr 22, 2014 · 5 comments
Closed

上传图片问题 #57

attsion opened this issue Apr 22, 2014 · 5 comments

Comments

@attsion
Copy link

attsion commented Apr 22, 2014

上传图片之后 查看编辑器html会发现 src中是完整路径,这样我localhost上传的图片别人是无法查看的,请问如何像ueditor那样上传相对路径的图片?

@Jinqn
Copy link
Contributor

Jinqn commented Apr 23, 2014

后台返回的是什么路径?

一般修改返回路径和修改imagePath参数就可以实现:
假如返回的路径是upload/123.jpg
imagePath可以设置三种类型:
'./php/' //相对路径
'/ueditor/php/' //根路径
'/http://localhost/ueditor/php/' //绝对路径

另外, 在ie下, img属性上的根路径和相对路径, 可能被替换成为绝对路径, 所以插入编辑器的时候会使用_src临时保存路径值, 在getContent时, 通过输出过滤规则_src设置会src属性上

@attsion
Copy link
Author

attsion commented Apr 24, 2014

后台返回根路径,但是到了前台会加上http://localhost, 包括_src,我用的chrome浏览器。

@Jinqn
Copy link
Contributor

Jinqn commented Apr 25, 2014

你getContent()的数据正常吗?
会不会是你提交的内容不是通过getContent获取的内容??

@attsion
Copy link
Author

attsion commented Apr 26, 2014

是用getContent获取的内容没错。追踪了js半天也不知道是在哪加的哪个http

@Jinqn
Copy link
Contributor

Jinqn commented Apr 28, 2014

你的页面可以访问到吗?加我Q联系:459452372

@Jinqn Jinqn closed this as completed Apr 28, 2014
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

2 participants