From 0f8a415a8bbbe3e5860029d24639f8ca80e7a0ca Mon Sep 17 00:00:00 2001 From: maning <3297813122@qq.com> Date: Wed, 23 Oct 2024 16:11:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=B8=8B=E8=BD=BD=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E5=90=8E=EF=BC=8C=E6=96=87=E4=BB=B6=E5=89=AF=E6=9C=AC?= =?UTF-8?q?=E6=AE=8B=E7=95=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/net/ximatai/muyun/fileserver/FileService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/muyun-fileserver/src/main/java/net/ximatai/muyun/fileserver/FileService.java b/muyun-fileserver/src/main/java/net/ximatai/muyun/fileserver/FileService.java index e3828de0..58536a7f 100644 --- a/muyun-fileserver/src/main/java/net/ximatai/muyun/fileserver/FileService.java +++ b/muyun-fileserver/src/main/java/net/ximatai/muyun/fileserver/FileService.java @@ -104,13 +104,13 @@ private void download(RoutingContext ctx) { ctx.response() .putHeader("Content-Disposition", "attachment; filename=" + content) .sendFile(fileObtained.getPath()); + vertx.fileSystem().delete(fileObtained.getPath()); } } else { logger.error("Failed to read file name: " + result.cause()); ctx.fail(result.cause()); } }); - } // @Route(path = "/fileServer/delete/:id", methods = Route.HttpMethod.GET)