From 523d88a5cb91342634c2f7d5a83044a8bd7dd9a1 Mon Sep 17 00:00:00 2001 From: icewing Date: Thu, 1 May 2008 14:47:02 +0000 Subject: Marcus Povey * Error handling git-svn-id: https://code.elgg.org/elgg/trunk@598 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/file/actions/upload.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/mod/file/actions/upload.php b/mod/file/actions/upload.php index 18a6c388a..255d8ef06 100644 --- a/mod/file/actions/upload.php +++ b/mod/file/actions/upload.php @@ -18,7 +18,13 @@ // Extract file from, save to default filestore (for now) $prefix = "/file/"; $file = new ElggFile(); - $file->save(); + $result = $file->save(); + + if ($result) + system_message(elgg_echo("file:saved")); + else + system_message(elgg_echo("file:uploadfailed")); + $file->setFilename($_FILES['upload']['name']); $file->setMimeType($_FILES['upload']['type']); -- cgit v1.2.3