summaryrefslogtreecommitdiffstats
path: root/apps/files/js/file-upload.js
diff options
context:
space:
mode:
authorTomasz Grobelny <tomasz@grobelny.net>2019-01-29 21:26:44 +0100
committerTomasz Grobelny <tomasz@grobelny.net>2019-01-29 21:26:44 +0100
commit08919eb19335825dc1f2cd950f9529a2b9caf29b (patch)
treeb8b0feecbac68789b0f89526c19f1c64523e2544 /apps/files/js/file-upload.js
parent04d326f95feacd640dc5d6fecff1ec0ef0970265 (diff)
parentdeb7d2364f38ce24bee62cd490fccfd6e4d3f059 (diff)
downloadnextcloud-server-08919eb19335825dc1f2cd950f9529a2b9caf29b.tar.gz
nextcloud-server-08919eb19335825dc1f2cd950f9529a2b9caf29b.zip
Merge branch 'master' into operation_progress_improvements3
Signed-off-by: Tomasz Grobelny <tomasz@grobelny.net>
Diffstat (limited to 'apps/files/js/file-upload.js')
-rw-r--r--apps/files/js/file-upload.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js
index 741a6517af9..e0b274cdc76 100644
--- a/apps/files/js/file-upload.js
+++ b/apps/files/js/file-upload.js
@@ -194,7 +194,7 @@ OC.FileUpload.prototype = {
var data = this.data;
var file = this.getFile();
- // it was a folder upload, so make sure the parent directory exists alrady
+ // it was a folder upload, so make sure the parent directory exists already
var folderPromise;
if (file.relativePath) {
folderPromise = this.uploader.ensureFolderExists(this.getFullPath());
@@ -528,7 +528,9 @@ OC.Uploader.prototype = _.extend({
self.filesClient.createDirectory(fullPath).always(function(status) {
// 405 is expected if the folder already exists
if ((status >= 200 && status < 300) || status === 405) {
- self.trigger('createdfolder', fullPath);
+ if (status !== 405) {
+ self.trigger('createdfolder', fullPath);
+ }
deferred.resolve();
return;
}
@@ -660,7 +662,7 @@ OC.Uploader.prototype = _.extend({
// when only replacement selected -> overwrite
self.onReplace(conflict.data('data'));
} else {
- // when only original seleted -> skip
+ // when only original selected -> skip
// when none selected -> skip
self.onSkip(conflict.data('data'));
}
@@ -857,7 +859,8 @@ OC.Uploader.prototype = _.extend({
type: 'PUT',
dropZone: options.dropZone, // restrict dropZone to content div
autoUpload: false,
- sequentialUploads: true,
+ sequentialUploads: false,
+ limitConcurrentUploads: 10,
//singleFileUploads is on by default, so the data.files array will always have length 1
/**
* on first add of every selection
@@ -1036,7 +1039,7 @@ OC.Uploader.prototype = _.extend({
// target folder does not exist any more
OC.Notification.show(t('files', 'Target folder "{dir}" does not exist any more', {dir: upload.getFullPath()} ), {type: 'error'});
self.cancelUploads();
- } else if (status === 507) {
+ } else if (data.textStatus === 'notenoughspace') {
// not enough space
OC.Notification.show(t('files', 'Not enough free space'), {type: 'error'});
self.cancelUploads();