@GetMapping("/download")
public void download(String fileName, HttpServletResponse response, HttpServletRequest request) {
// if (!FileUtils.checkAllowDownload(fileName)) {
// throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
String filePath = RuoYiConfig.getProfile();
String downloadPath = filePath + fileName.replace("/profile", "");
String downloadName = StringUtils.substringAfterLast(downloadPath, "/");
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
FileUtils.setAttachmentResponseHeader(response, downloadName);
FileUtils.writeBytes(downloadPath, response.getOutputStream());