修正linux下ueditor的图片预览列表的地址不对问题

This commit is contained in:
thinkgem
2019-12-26 10:42:10 +08:00
parent 6a5794f26c
commit c2e4347ddf

View File

@@ -80,7 +80,7 @@ public class FileManager {
// ThinkGem 将绝对路径转换为虚拟路径
String url = PathFormat.format( this.getPath( file ) );
int index = url.indexOf(USERFILES_BASE_URL);
if(index > 0) {
if(index >= 0) {
url = url.substring(index + USERFILES_BASE_URL.length());
}
fileState.putInfo( "url", request.getContextPath() + USERFILES_BASE_URL + url );