Quellcode durchsuchen

Merge branch 'dev/KLBstand' into dev/precwfile

gaodm vor 6 Jahren
Ursprung
Commit
8182a307b6

+ 5 - 2
icssman-service/src/main/java/com/diagbot/client/fastdfs/FastDFSClient.java

@@ -25,8 +25,11 @@ public class FastDFSClient {
     public static String[] upload(FastDFSFile file) {
         logger.info("File Name: " + file.getName() + "File Length:" + file.getContent().length);
 
-        NameValuePair[] meta_list = new NameValuePair[1];
-        meta_list[0] = new NameValuePair("author", file.getAuthor());
+        // 设置元信息
+        NameValuePair[] meta_list = new NameValuePair[3];
+        meta_list[0] = new NameValuePair("name", file.getName());
+        meta_list[1] = new NameValuePair("ext", file.getExt());
+        meta_list[2] = new NameValuePair("author", file.getAuthor());
 
         long startTime = System.currentTimeMillis();
         String[] uploadResults = null;

+ 5 - 2
knowledgeman-service/src/main/java/com/diagbot/client/fastdfs/FastDFSClient.java

@@ -25,8 +25,11 @@ public class FastDFSClient {
     public static String[] upload(FastDFSFile file) {
         logger.info("File Name: " + file.getName() + "File Length:" + file.getContent().length);
 
-        NameValuePair[] meta_list = new NameValuePair[1];
-        meta_list[0] = new NameValuePair("author", file.getAuthor());
+        // 设置元信息
+        NameValuePair[] meta_list = new NameValuePair[3];
+        meta_list[0] = new NameValuePair("name", file.getName());
+        meta_list[1] = new NameValuePair("ext", file.getExt());
+        meta_list[2] = new NameValuePair("author", file.getAuthor());
 
         long startTime = System.currentTimeMillis();
         String[] uploadResults = null;