Skip to content

Commit

Permalink
Merge pull request #9124 from nextcloud/stable13-9085-fix-progress-ba…
Browse files Browse the repository at this point in the history
…r-hidden-before-the-upload-ends

[stable13] Fix progress bar hidden before the upload ends
  • Loading branch information
skjnldsv authored Apr 9, 2018
2 parents 2b0b717 + 9e9e053 commit 3f19eb0
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions apps/files/js/file-upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,6 @@ OC.Uploader.prototype = _.extend({
status = upload.getResponseStatus();
}
self.log('fail', e, upload);
self._hideProgressBar();

if (data.textStatus === 'abort') {
self.showUploadCancelMessage();
Expand Down Expand Up @@ -1109,14 +1108,11 @@ OC.Uploader.prototype = _.extend({
self.log('progress handle fileuploadstop', e, data);

self.clear();
self._hideProgressBar();
self.trigger('stop', e, data);
});
fileupload.on('fileuploadfail', function(e, data) {
self.log('progress handle fileuploadfail', e, data);
//if user pressed cancel hide upload progress bar and cancel button
if (data.errorThrown === 'abort') {
self._hideProgressBar();
}
self.trigger('fail', e, data);
});
var disableDropState = function() {
Expand Down Expand Up @@ -1175,11 +1171,9 @@ OC.Uploader.prototype = _.extend({
fileupload.on('fileuploaddone', function(e, data) {
var upload = self.getUpload(data);
upload.done().then(function() {
self._hideProgressBar();
self.trigger('done', e, upload);
}).fail(function(status, response) {
var message = response.message;
self._hideProgressBar();
if (status === 507) {
// not enough space
OC.Notification.show(message || t('files', 'Not enough free space'), {type: 'error'});
Expand Down

0 comments on commit 3f19eb0

Please sign in to comment.