val fileToServe = TemporaryFile(new File(fileName))
Ok.sendFile(fileToServe.file, onClose = () => { fileToServe.clean })
But when client disconnects the connection, the temporary file remains in the local server. But i want to handle this disconnection and clean up the
temporary file. I heard about onDoneEnumerating() but couldn't use it.
Can anyone point me out the easiest way to catch the disconnection and clean up the temporary file from local server?
--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/dcaa752d-7eb1-4cc0-83d9-cfa47f8b035d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.