diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2016-06-11 15:15:37 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2016-06-11 15:15:37 +0200 |
commit | ca43c49709e221a6ac7343163a36a21bf74ac2f7 (patch) | |
tree | db9496421660a14c80b06e9e3ceda000f51aaaf7 /apps/files/ajax | |
parent | 842cc2a7889d1ff8004fddd2546aec1232e0eaed (diff) | |
download | nextcloud-server-ca43c49709e221a6ac7343163a36a21bf74ac2f7.tar.gz nextcloud-server-ca43c49709e221a6ac7343163a36a21bf74ac2f7.zip |
smaller files drop fixes
* fix infinite spinner on blacklisted files
* move HTML to template
* indentation
Diffstat (limited to 'apps/files/ajax')
-rw-r--r-- | apps/files/ajax/upload.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 98066845734..d243b6ad97e 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -43,6 +43,7 @@ OCP\JSON::setContentTypeHeader('text/plain'); // If no token is sent along, rely on login only $errorCode = null; +$errorFileName = null; $l = \OC::$server->getL10N('files'); if (empty($_POST['dirToken'])) { @@ -225,6 +226,7 @@ if (\OC\Files\Filesystem::isValidPath($dir) === true) { } else { $error = $l->t('Upload failed. Could not find uploaded file'); + $errorFileName = $files['name'][$i]; } } catch(Exception $ex) { $error = $ex->getMessage(); @@ -272,5 +274,9 @@ if ($error === false) { } OCP\JSON::encodedPrint($result); } else { - OCP\JSON::error(array(array('data' => array_merge(array('message' => $error, 'code' => $errorCode), $storageStats)))); + OCP\JSON::error(array(array('data' => array_merge(array( + 'message' => $error, + 'code' => $errorCode, + 'filename' => $errorFileName + ), $storageStats)))); } |