|
@@ -81,7 +81,7 @@ public class AttachServiceImpl implements AttachService {
|
|
|
File file = new File(fileMap.get(entry));
|
|
File file = new File(fileMap.get(entry));
|
|
|
if (file.exists()) {
|
|
if (file.exists()) {
|
|
|
Map<String, Object> params = entryParams.get(entry);
|
|
Map<String, Object> params = entryParams.get(entry);
|
|
|
- // multi sources
|
|
|
|
|
|
|
+ // multi sources
|
|
|
sources = params.get("sourceId").toString().split(",");
|
|
sources = params.get("sourceId").toString().split(",");
|
|
|
for (String sr : sources) {
|
|
for (String sr : sources) {
|
|
|
Attach attach = new Attach(String.valueOf(params.get("name")), fileMap.get(entry), description, file.length(),
|
|
Attach attach = new Attach(String.valueOf(params.get("name")), fileMap.get(entry), description, file.length(),
|
|
@@ -130,19 +130,19 @@ public class AttachServiceImpl implements AttachService {
|
|
|
String path = PathUtils.getFilePath() + "postattach";
|
|
String path = PathUtils.getFilePath() + "postattach";
|
|
|
File dir = new File(path);
|
|
File dir = new File(path);
|
|
|
if (!dir.isDirectory()) {
|
|
if (!dir.isDirectory()) {
|
|
|
- dir.mkdir();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ dir.mkdir();
|
|
|
|
|
+ }
|
|
|
path += File.separator + parentDir;
|
|
path += File.separator + parentDir;
|
|
|
dir = new File(path);
|
|
dir = new File(path);
|
|
|
if (!dir.isDirectory()) {
|
|
if (!dir.isDirectory()) {
|
|
|
- dir.mkdir();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ dir.mkdir();
|
|
|
|
|
+ }
|
|
|
if (SystemSession.getUser() != null) {
|
|
if (SystemSession.getUser() != null) {
|
|
|
path += File.separator + SystemSession.getUser().getEnterprise().getUu();
|
|
path += File.separator + SystemSession.getUser().getEnterprise().getUu();
|
|
|
dir = new File(path);
|
|
dir = new File(path);
|
|
|
if (!dir.isDirectory()) {
|
|
if (!dir.isDirectory()) {
|
|
|
- dir.mkdir();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ dir.mkdir();
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
return path;
|
|
return path;
|
|
|
}
|
|
}
|