aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-01-22 17:17:58 +0100
committerVincent Petry <pvince81@owncloud.com>2014-01-29 12:46:11 +0100
commit58c7042e708172b8e2fe252fc53abe87bcf8c1f1 (patch)
tree891abca5d6cf02a504fda3082203aa8a8cb3d53d /apps/files/js
parenta2b79ead2dad807779c51a32cf880fe0bd33d3bc (diff)
downloadnextcloud-server-58c7042e708172b8e2fe252fc53abe87bcf8c1f1.tar.gz
nextcloud-server-58c7042e708172b8e2fe252fc53abe87bcf8c1f1.zip
Added error message for when target folder was removed
Whent trying to upload/rename/create files in a folder that was removed or rename, the correct error message is now shown. In the case of upload of multiple files, the upload is cancelled. This situation can happen if the target folder was renamed or removed from another browser window or client.
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/file-upload.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 225c3319107..486273a910c 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -315,6 +315,13 @@ $(document).ready(function() {
} else {
// HTTP connection problem
OC.Notification.show(data.errorThrown);
+ if (data.result) {
+ var result = JSON.parse(data.result);
+ if (result && result[0] && result[0].data && result[0].data.code === 'targetnotfound') {
+ // abort upload of next files if any
+ OC.Upload.cancelUploads();
+ }
+ }
}
//hide notification after 10 sec
setTimeout(function() {