From 591dda2fedcaa73f605bb336e2aece19229ec43c Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 23 Aug 2017 15:43:52 +0200 Subject: [PATCH] Show "Uploading..." in web UI for long uploads 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 --- apps/files/js/file-upload.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/files/js/file-upload.js b/apps/files/js/file-upload.js index 2fa3122a00..11365a310e 100644 --- a/apps/files/js/file-upload.js +++ b/apps/files/js/file-upload.js @@ -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',