mdedetrich commented on code in PR #170:
URL:
https://github.com/apache/incubator-pekko-http/pull/170#discussion_r1215870979
##########
http/src/main/scala/org/apache/pekko/http/scaladsl/server/directives/FileUploadDirectives.scala:
##########
@@ -175,9 +176,12 @@ trait FileUploadDirectives {
implicit val ec = ctx.executionContext
def tempDest(fileInfo: FileInfo): File = {
- val dest = File.createTempFile("pekko-http-upload", ".tmp")
- dest.deleteOnExit()
- dest
+ val dest = Files.createTempFile("pekko-http-upload", ".tmp")
+ Runtime.getRuntime.addShutdownHook(new Thread() {
Review Comment:
This is the equivalent of what `dest.deleteOnExit` does behind the scenes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]