java110
2023-01-30 400795021ce677daf900e6c2818998222212f8a3
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);