mirror of
https://github.com/Hello-hao/Tbed.git
synced 2024-04-21 12:32:10 +00:00
2019-10-8更新
This commit is contained in:
@@ -19,7 +19,8 @@ public class LocUpdateImg {
|
||||
|
||||
|
||||
|
||||
public static Map<ReturnImage, Integer> ImageuploadLOC(Map<String, MultipartFile> fileMap, String username, Map<String, String> fileMap2) throws Exception {
|
||||
public static Map<ReturnImage, Integer> ImageuploadLOC(Map<String, MultipartFile> fileMap, String username,
|
||||
Map<String, String> fileMap2,Integer setday) throws Exception {
|
||||
String filePath =File.separator + "HellohaoData" + File.separator;
|
||||
if(fileMap2==null){
|
||||
File file = null;
|
||||
@@ -51,6 +52,10 @@ public class LocUpdateImg {
|
||||
returnImage.setImgname(entry.getValue().getOriginalFilename());
|
||||
returnImage.setImgurl(username + "/" + uuid+times + "." + entry.getKey());
|
||||
ImgUrl.put(returnImage, (int) (entry.getValue().getSize()));
|
||||
if(setday>0) {
|
||||
String deleimg = DateUtils.plusDay(setday);
|
||||
DeleImg.charu(username + "/" + uuid + times + "." + entry.getKey() + "|" + deleimg + "|" + "5");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
System.err.println("上传失败");
|
||||
@@ -76,6 +81,10 @@ public class LocUpdateImg {
|
||||
ReturnImage returnImage = new ReturnImage();
|
||||
returnImage.setImgurl(username + "/" + uuid+times + "." + entry.getKey());
|
||||
ImgUrl.put( returnImage, ImgUrlUtil.getFileSize2(new File(newfilePath)));
|
||||
if(setday>0) {
|
||||
String deleimg = DateUtils.plusDay(setday);
|
||||
DeleImg.charu(username + "/" + uuid + times + "." + entry.getKey() + "|" + deleimg + "|" + "5");
|
||||
}
|
||||
}
|
||||
//new File(imgurl).delete();
|
||||
return ImgUrl;
|
||||
|
||||
Reference in New Issue
Block a user