|
@@ -67,7 +67,7 @@ public class Global {
|
|
|
*/
|
|
|
public static final String USERFILES_BASE_URL = "/freemarker/";
|
|
|
|
|
|
- public static final String FILES_fileServer = "/fileServer/";
|
|
|
+ public static final String FILES_FILESERVER = "/fileServer/";
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -140,10 +140,11 @@ public class Global {
|
|
|
SystemAuthorizingRealm.Principal principal = (SystemAuthorizingRealm.Principal) UserUtils.getPrincipal();
|
|
|
String dir = "";
|
|
|
if (SYS_TYPE.equals("1")) {
|
|
|
- dir = Global.getUserfilesBaseDir() + Global.FILES_fileServer;
|
|
|
+ dir = Global.getUserfilesBaseDir() + Global.FILES_FILESERVER;
|
|
|
} else {
|
|
|
- dir = Global.getUserfilesBaseDir() + "data/nginx/file" + Servlets.getRequest().getContextPath() + Global.FILES_fileServer;
|
|
|
+ dir = "/data/nginx/file" + Servlets.getRequest().getContextPath() + Global.FILES_FILESERVER;
|
|
|
}
|
|
|
+
|
|
|
FileUtils.createDirectory(dir);
|
|
|
return dir;
|
|
|
}
|
|
@@ -168,7 +169,7 @@ public class Global {
|
|
|
public static String getAttachmentUrl2() {
|
|
|
|
|
|
SystemAuthorizingRealm.Principal principal = (SystemAuthorizingRealm.Principal) UserUtils.getPrincipal();
|
|
|
- return Servlets.getRequest().getContextPath() + Global.FILES_fileServer;
|
|
|
+ return Servlets.getRequest().getContextPath() + Global.FILES_FILESERVER;
|
|
|
}
|
|
|
|
|
|
/**
|