From e5175fd277d597acce1d824c8c82da08d15b407a Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 3 Oct 2011 23:19:44 -0700 Subject: Fix the standard and REST uploaders to use a callback function to delete temporary files during shutdown. Fixes #1788. --- modules/rest/controllers/rest.php | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/rest') 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; } -- cgit v1.2.3