Browse Source

修改图片上传

Tiroble 3 năm trước cách đây
mục cha
commit
85ba3c6ec6

+ 1 - 4
src/main/java/com/steerinfo/dil/controller/RmsMaterialController.java

@@ -58,13 +58,10 @@ public class RmsMaterialController extends BaseRESTfulController {
         int year = calendar.get(Calendar.YEAR);
         int month = calendar.get(Calendar.MONTH);
         int day= calendar.get(Calendar.DAY_OF_MONTH);
-        //File.separator+year+File.separator+month+File.separator+day+File.separator
         //上传文件夹路径
         List<String> urls=new ArrayList<>();
         for (int i=0;i<files.length;i++){
-            String url = UploadUtils.uploadFile(files[i], new IdGenerator(i, 10), path, "2");
-            System.out.println("路径");
-            System.out.println("http://172.16.33.162/image"+File.separator+year+File.separator+month+File.separator+day+File.separator);
+            String url = UploadUtils.uploadFile(files[i], new IdGenerator(i, 10), path, File.separator+year+File.separator+month+File.separator+day+File.separator);
             urls.add(url);
         }
         return urls;

+ 2 - 3
src/main/resources/application-dev.yml

@@ -19,9 +19,8 @@ openfeign:
 
 #图片上传配置
 piction:
-  path: /image
- # path: /icore/data/nginx/html/image
-
+#  path: /icore/data/nginx/html/image
+  path: /usr/share/nginx/html
 #  path: C:\Users\24390\Desktop\work\a