| | |
| | | // 文件保存目录路径 |
| | | String savePath = fileStoragePath; |
| | | String abstractPath= DateUtil.dateFormatStr(new Date(),DateUtil.DATE_FORMAT_NO_SPLITE_DD); |
| | | savePath=savePath+File.separator+abstractPath; |
| | | |
| | | String fileName =UUIDUtil.getRandomID() + ".png"; |
| | | |
| | | |
| | |
| | | uploadDir.mkdir(); |
| | | } |
| | | |
| | | ImageUtil.base64ToFile(uploadPhotoDto.getBase64(), savePath+File.separator+abstractPath, fileName); |
| | | ImageUtil.base64ToFile(uploadPhotoDto.getBase64(),savePath , fileName); |
| | | LogUtil.info("fileName : {}", fileName); |
| | | |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("上传成功"); |
| | | ajaxResult.putInMap("file", nginxUrl +"/"+ abstractPath+fileName); |
| | | ajaxResult.putInMap("file", nginxUrl + abstractPath+"/"+fileName); |
| | | return ajaxResult; |
| | | } |
| | | |