aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/file-upload.js
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-10-30 13:41:10 +0100
committerRobin Appelman <icewind@owncloud.com>2013-10-30 13:41:10 +0100
commitc9f3f2874f3136342965a1d255d030de87725519 (patch)
tree8a9ca523992d2b461d71c3483bd1e0b31dae4f7a /apps/files/js/file-upload.js
parent654b0daf0145b216d81347325b17cf522a49ec81 (diff)
parent4c964cbbbe2b92d6220410cda5e7905e529fc713 (diff)
downloadnextcloud-server-c9f3f2874f3136342965a1d255d030de87725519.tar.gz
nextcloud-server-c9f3f2874f3136342965a1d255d030de87725519.zip
Merge branch 'master' into update-parent-storage-mtime
Conflicts: lib/private/files/cache/updater.php
Diffstat (limited to 'apps/files/js/file-upload.js')
-rw-r--r--apps/files/js/file-upload.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 5bf4f5c0981..95c0723f254 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -334,8 +334,13 @@ $(document).ready(function() {
var result=$.parseJSON(response);
delete data.jqXHR;
-
- if (typeof result[0] === 'undefined') {
+
+ if (result.status === 'error' && result.data && result.data.message){
+ data.textStatus = 'servererror';
+ data.errorThrown = result.data.message;
+ var fu = $(this).data('blueimp-fileupload') || $(this).data('fileupload');
+ fu._trigger('fail', e, data);
+ } else if (typeof result[0] === 'undefined') {
data.textStatus = 'servererror';
data.errorThrown = t('files', 'Could not get result from server.');
var fu = $(this).data('blueimp-fileupload') || $(this).data('fileupload');