Skip to content

Commit

Permalink
优化下载文件后,文件副本残留的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Ning19230223 committed Oct 23, 2024
1 parent efc200a commit 0f8a415
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0f8a415

Please sign in to comment.