http/request/upload_temp_files
library
Functions
-
keepTempFile(HttpRequest req, File file)
→ void
-
remember a temp file of
req. it is deleted by releaseTempFiles.
-
keepTempFilesUntil(HttpRequest req, Future<void> work)
→ void
-
work still runs although the request got its answer (see
RequestTimeout). The temp files of req are kept until it ends. Does
nothing for a request with no temp file. A work that never ends keeps
the files for ever, like a handler that never ends.
-
releaseTempFiles(HttpRequest req)
→ void
-
call this when the handler of
req has ended (or failed). the files are
deleted when the response is done and the AfterResponse work has run
(AfterResponse work that never ends keeps them for ever).
The response can be done early (the client left), so done alone is
not a safe time: the handler may still read the files.
safe to call many times.