Bladeren bron

修改图片路径

xusonglin 5 jaren geleden
bovenliggende
commit
a1b2740c37
1 gewijzigde bestanden met toevoegingen van 1 en 1 verwijderingen
  1. 1 1
      src/main/java/com/jkcredit/sysnews/service/photo/PhotoServiceImpl.java

+ 1 - 1
src/main/java/com/jkcredit/sysnews/service/photo/PhotoServiceImpl.java

@@ -56,7 +56,7 @@ public class PhotoServiceImpl extends BaseService implements PhotoService {
         int month = cal.get(Calendar.MONTH) + 1;
         int year = cal.get(Calendar.YEAR);
         String directoryName = year+"-"+month;
-        String filePath = uploadPath + directoryName + File.separator + fileName;
+        String filePath = uploadPath + File.separator + directoryName + File.separator + fileName;
         try {
             UploadUtil.upload(photo, filePath);
         } catch (IOException ioe) {