Your Name
2023-03-14 865cb1b3495e16b54fa44c3c695b70d14952f756
springboot/src/main/java/com/java110/boot/controller/app/file/UserDownloadFileController.java
@@ -47,7 +47,7 @@
        List<UserDownloadFileDto> userDownloadFileDtos = userDownloadFileV1InnerServiceSMOImpl.queryUserDownloadFiles(userDownloadFileDto);
        Assert.listOnlyOne(userDownloadFileDtos, "文件不存在");
        String tempUrl = userDownloadFileDtos.get(0).getTempUrl();
        String fileName = tempUrl.substring(tempUrl.lastIndexOf("/"));
        String fileName = userDownloadFileDtos.get(0).getFileTypeName()+tempUrl.substring(tempUrl.lastIndexOf("/"));
        response.setHeader("content-type", "application/octet-stream");
        response.setHeader("Content-Disposition", "attachment; filename=" + fileName);