Skip to content

Commit

Permalink
Show "Uploading..." in web UI for long uploads
Browse files Browse the repository at this point in the history
If the estimated upload time is bigger than 4 hours it shows the text
"Uploading..." because the time then doesn't give any good hint to the
user anyways.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
  • Loading branch information
MorrisJobke committed Aug 23, 2017
1 parent 08b71ca commit 591dda2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/files/js/file-upload.js
Expand Up @@ -1021,6 +1021,10 @@ OC.Uploader.prototype = _.extend({
}

var h = moment.duration(smoothRemainingSeconds, "seconds").humanize();
if (!(smoothRemainingSeconds >= 0 && smoothRemainingSeconds < 14400)) {
// show "Uploading ..." for durations longer than 4 hours
h = t('files', 'Uploading...');
}
$('#uploadprogressbar .label .mobile').text(h);
$('#uploadprogressbar .label .desktop').text(h);
$('#uploadprogressbar').attr('original-title',
Expand Down

0 comments on commit 591dda2

Please sign in to comment.