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)