diff options
author | Bharat Mediratta <bharat@menalto.com> | 2011-10-03 23:19:44 -0700 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2011-10-03 23:19:44 -0700 |
commit | e5175fd277d597acce1d824c8c82da08d15b407a (patch) | |
tree | 8e444eae5942734c2b4742c2c8e42334e8a94bf6 /modules/rest/controllers | |
parent | 0a8678d0cbbb11a1544b2a0474d77ebba72c8a9b (diff) |
Fix the standard and REST uploaders to use a callback function to
delete temporary files during shutdown. Fixes #1788.
Diffstat (limited to 'modules/rest/controllers')
-rw-r--r-- | modules/rest/controllers/rest.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/rest/controllers/rest.php b/modules/rest/controllers/rest.php index 52d9925b..624a02a0 100644 --- a/modules/rest/controllers/rest.php +++ b/modules/rest/controllers/rest.php @@ -69,6 +69,7 @@ class Rest_Controller extends Controller { $request->params = (object) $input->post(); if (isset($_FILES["file"])) { $request->file = upload::save("file"); + Event::add("system.shutdown", create_function("", "unlink(\"{$request->file}\");")); } break; } |