diff --git a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/FileController.java b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/FileController.java index fe0e27d..a59c562 100644 --- a/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/FileController.java +++ b/kn-service/biz-vordm/src/main/java/com/kening/vordm/controller/FileController.java @@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; @@ -74,4 +75,16 @@ public class FileController { } return bladeFile; } + + /** + * 删除 images 文件 + * @param + * @return + */ + @PostMapping("/removeFileImages") + public R removeFile(@RequestParam String fileUrl){ + String[] fileUrlArr= fileUrl.split("/"); + minioTemplate.removeFile("images",fileUrlArr[3]+"/"+fileUrlArr[4]+"/"+fileUrlArr[5]); + return R.data(true); + } }