summaryrefslogtreecommitdiffstats
path: root/files/ajax
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2011-04-16 23:28:50 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2011-04-16 23:28:50 +0200
commitb129079bed8ebd1b5051dabe15eccdc17bf4b403 (patch)
tree12a75ee6c6e1333f37d97e9a4b073602393bbc28 /files/ajax
parentda5d38826625c59ee4fe4aaf9c1b5f35bd2bbbbb (diff)
downloadnextcloud-server-b129079bed8ebd1b5051dabe15eccdc17bf4b403.tar.gz
nextcloud-server-b129079bed8ebd1b5051dabe15eccdc17bf4b403.zip
show error code if file upload fails
Diffstat (limited to 'files/ajax')
-rw-r--r--files/ajax/upload.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/files/ajax/upload.php b/files/ajax/upload.php
index b3facf96723..79b6c0b284c 100644
--- a/files/ajax/upload.php
+++ b/files/ajax/upload.php
@@ -27,6 +27,8 @@ and $_SESSION['username'] and strpos($dir,'..') === false){
}
}
-echo json_encode(array( "status" => "error"));
+$error = $_FILES['file']['error'];
+
+echo json_encode(array( 'status' => 'error', 'data' => array('error' => $error)));
?>