Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions apps/files/js/file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ OC.FileUpload.prototype = {
this.data.headers['Authorization'] =
'Basic ' + btoa(userName + ':' + (password || ''));
}
this.data.headers['requesttoken'] = OC.requestToken;

var chunkFolderPromise;
if ($.support.blobSlice
Expand Down Expand Up @@ -1195,11 +1196,15 @@ OC.Uploader.prototype = _.extend({
fileupload.on('fileuploaddone', function(e, data) {
var upload = self.getUpload(data);
upload.done().then(function() {
// don't hide if there are more files to process
if (!self.isProcessing()) {
self._hideProgressBar();
}
self.trigger('done', e, upload);
// defer because sometimes the current upload is still in pending
// state but frees itself afterwards
_.defer(function() {
// don't hide if there are more files to process
if (!self.isProcessing()) {
self._hideProgressBar();
}
});
}).fail(function(status, response) {
var message = response.message;
self._hideProgressBar();
Expand Down
2 changes: 1 addition & 1 deletion apps/files/js/filelist.js
Original file line number Diff line number Diff line change
Expand Up @@ -2702,7 +2702,7 @@
return false;
}

var dropTarget = $(e.originalEvent.target);
var dropTarget = $(e.originalEvent.delegatedEvent.target);
// check if dropped inside this container and not another one
if (dropTarget.length
&& !self.$el.is(dropTarget) // dropped on list directly
Expand Down
4 changes: 3 additions & 1 deletion apps/files/tests/js/filelistSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2649,7 +2649,9 @@ describe('OCA.Files.FileList tests', function() {
function dropOn($target, data) {
var eventData = {
originalEvent: {
target: $target
delegatedEvent: {
target: $target
}
}
};
uploader.trigger('drop', eventData, data || {});
Expand Down