aboutsummaryrefslogtreecommitdiff
path: root/mod/file/actions/upload.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-01 14:47:02 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-05-01 14:47:02 +0000
commit523d88a5cb91342634c2f7d5a83044a8bd7dd9a1 (patch)
tree275c285695a43a04d6ba0379125d5be4d5406741 /mod/file/actions/upload.php
parentfc339abb476d569617fa0ae5b09dbeca0ac7b8bd (diff)
downloadelgg-523d88a5cb91342634c2f7d5a83044a8bd7dd9a1.tar.gz
elgg-523d88a5cb91342634c2f7d5a83044a8bd7dd9a1.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Error handling git-svn-id: https://code.elgg.org/elgg/trunk@598 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file/actions/upload.php')
-rw-r--r--mod/file/actions/upload.php8
1 files changed, 7 insertions, 1 deletions
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']);