Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Xie Xianbin committed Nov 15, 2014
1 parent 317bf11 commit 0ea5ca3
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,25 @@ UEditor-for-aliyun-OSS
Create By Xie Xianbin, Package for ueditor and aliyun's OSS.


最近发现Ueditor 1.4.3 jsp utf-8版,存在图片上传功能不能直接使用的Bug,修复方法如下:
ueditor 1.4.3 jsp utf-8版,存在图片上传功能不能直接使用的Bug,修复方法如下:

#####1. 修改com.baidu.ueditor.hunter.FileManager类下的getPath方法,参考如下:


源代码:
```
private String getPath ( File file ) {
String path = file.getAbsolutePath();
return path.replace( this.rootPath, "/" );
}
```

修改为:

```
private String getPath ( File file ) {
String path = file.getAbsolutePath();
String str=path.replace(this.rootPath.replaceAll("\\/", "\\\\"), "\\" );
Expand All @@ -43,21 +40,13 @@ private String getPath ( File file ) {

```
function getRootPath(){
//获取当前网址,如: http://localhost/ueditor/index.jsp
var curWwwPath=window.document.location.href;
var pathName=window.document.location.pathname;
var pos=curWwwPath.indexOf(pathName);
var localhostPaht=curWwwPath.substring(0,pos);
var projectName=pathName.substring(0,pathName.substr(1).indexOf('/')+1);
return localhostPaht + projectName;
}
```
######(2)分别在以下两个地方添加刚才获取的项目地址
Expand Down

0 comments on commit 0ea5ca3

Please sign in to comment.