From 3d493fc75dc6e3593001c2d9dfef26f4c1d79c2c Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Tue, 29 Mar 2016 19:59:36 -0400 Subject: Add function Form::saveUploadedFile() Added function to form class to move tmp uploaded files to permanent storage --- app/class/form.class.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app') diff --git a/app/class/form.class.php b/app/class/form.class.php index 529c480..3f28a36 100644 --- a/app/class/form.class.php +++ b/app/class/form.class.php @@ -232,6 +232,14 @@ class Form /* return */ return count($this->errorlist) == 0; } + + /* + * Save file uploaded through web form + */ + function saveUploadedFile($file, $filename) + { + return move_uploaded_file($file['tmp_name'], $filename); + } } ?> -- cgit v1.2.3