Don't try the actual file upload if the checks already error out
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
ca490bafb9
commit
69d2d0178a
|
@ -1113,6 +1113,9 @@ OC.Uploader.prototype = _.extend({
|
||||||
});
|
});
|
||||||
fileupload.on('fileuploaddrop', function(e, data) {
|
fileupload.on('fileuploaddrop', function(e, data) {
|
||||||
self.trigger('drop', e, data);
|
self.trigger('drop', e, data);
|
||||||
|
if (e.isPropagationStopped()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -2795,6 +2795,7 @@
|
||||||
var isCreatable = (self.getDirectoryPermissions() & OC.PERMISSION_CREATE) !== 0;
|
var isCreatable = (self.getDirectoryPermissions() & OC.PERMISSION_CREATE) !== 0;
|
||||||
if (!isCreatable) {
|
if (!isCreatable) {
|
||||||
self._showPermissionDeniedNotification();
|
self._showPermissionDeniedNotification();
|
||||||
|
e.stopPropagation();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2810,6 +2810,8 @@ describe('OCA.Files.FileList tests', function() {
|
||||||
target: $target
|
target: $target
|
||||||
},
|
},
|
||||||
preventDefault: function () {
|
preventDefault: function () {
|
||||||
|
},
|
||||||
|
stopPropagation: function() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
uploader.trigger('drop', eventData, data || {});
|
uploader.trigger('drop', eventData, data || {});
|
||||||
|
|
Loading…
Reference in New Issue