You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enhancement: Show "time left" during upload in Web UI. #8105
One trouble is that it's not possible to know how many bytes were uploaded while a file is uploading.
But it is possible to detect how much time was required for a single file from a batch to be uploaded
Since the file size is known, it could be used to calculate the estimated time.
This means it can only work for a batch of files (more than one file).
how is the progress bar calculated? There could be a simple timer that starts when the progress bar starts, and then you can calculate the time which should be left. (e.g. 10% in the progressbar - 1 minute, so rest time is round about 9 minutes).
Also for large files it would be great to display some numbers/stats at all, because it is difficult to watch a bar moving 1px while waiting.
Having a frequent changing number shows progress, while it change doesn't change the bar with.
For me it is very helpful to see, there is really something happening, changing.
Example from Mega, they have a batch of stats about the upload:
Side-note: Also they show the progress on the title bar
Like Windows 8 did it:
Besides improving speed, also make the waiting nicer, brag with progress!
I don't think this really has high priority right now, but it would be nice if someone would like to look into it and contribute a PR. Even if incomplete, we might be able to provide some guidance.
It seems @luckydonald is on the right track 😄
Meh, I am not familiar with github and all this push pull things.
But basicly there should be be a function which sets the %.
My guess is apps/files/js/file-upload.js:466 (or :675 but probably the one)
Ok found it, in the wiki of the used blueimp/jQuery-File-Upload plugin:
From the data object we can get
Upload speed (formatted as GBps/MBps/KBps/Bps).
Remaining upload time (formatted as hh:mm:ss).
Uploaded and total bytes (formatted as bit/s, kbit/s, Mbit/s, Gbit/s).
Percentage of uploaded bytes.
But there is only data.bitrate as example, so I'm not sure how the other objects are named.
varlabelText=data.loaded+"/"+data.total+"MB - "+progress+"% @ "+data.bitrate;//here it happens.
Also, if it delivers "Percentage of uploaded bytes", do we need to do that calculations in file-upload.js:466 by ourself? Edit: it seems to come as string, probably like 12%, so never mind.
@luckydonald Or do know which files that have to be changed in the core to fix this? You showed an example before, what changes did you do and to what files?
A pull request is simply making that changes in the core and then make a pull request of it. Maybe @karlitschek can explain? It would be a good start, and other programmers can discuss and improve the code.
Finally got it working. Is a bit hax because of the used .progessbar() part.
Looking now through the files to collect the changes I made.
Also @enoch85 I cant open (edit) the "write here.odt", getting javascript errors.
So please don't remove it, so I can file a bug, if reproducable.
Activity
PVince81 commentedon Apr 8, 2014
Similar to #7173
One trouble is that it's not possible to know how many bytes were uploaded while a file is uploading.
But it is possible to detect how much time was required for a single file from a batch to be uploaded
Since the file size is known, it could be used to calculate the estimated time.
This means it can only work for a batch of files (more than one file).
stefan-niedermann commentedon Apr 15, 2014
how is the progress bar calculated? There could be a simple timer that starts when the progress bar starts, and then you can calculate the time which should be left. (e.g. 10% in the progressbar - 1 minute, so rest time is round about 9 minutes).
enoch85 commentedon Apr 17, 2014
I´d think that the most simple way is to just show how many MB that´s left of the upload.
For example: 1542.4 MB of 20487.5 MB (left)
PVince81 commentedon Apr 30, 2014
There seem to be progress events triggered already and they contain the uploaded size and total size. That place could be the starting point for making such measurements, see: https://github.com/owncloud/core/blob/master/apps/files/js/file-upload.js#L451
enoch85 commentedon May 1, 2014
I´m not a programmer but what I mean is something like this: owncloud/client#1717
Do you think that would be hard to implement in the core as well? @PVince81
enoch85 commentedon Jul 14, 2014
Any new info here?
luckydonald commentedon Aug 7, 2014
I realized the upload progress bar has nice detailed percent values, (
99.04551991172397%) which could be used for calculations of remaining time?Also for large files it would be great to display some numbers/stats at all, because it is difficult to watch a bar moving 1px while waiting.
Having a frequent changing number shows progress, while it change doesn't change the bar with.
For me it is very helpful to see, there is really something happening, changing.
Example from Mega, they have a batch of stats about the upload:


Side-note: Also they show the progress on the title bar
Like Windows 8 did it:
Besides improving speed, also make the waiting nicer, brag with progress!
PVince81 commentedon Aug 8, 2014
I don't think this really has high priority right now, but it would be nice if someone would like to look into it and contribute a PR. Even if incomplete, we might be able to provide some guidance.
It seems @luckydonald is on the right track 😄
enoch85 commentedon Aug 9, 2014
@luckydonald Nice! Do you have the skills to make this happen?
luckydonald commentedon Aug 9, 2014
Meh, I am not familiar with github and all this push pull things.
But basicly there should be be a function which sets the %.
My guess is
apps/files/js/file-upload.js:466 (or :675 but probably the one)
There we need some calculation magic.
But first we need to add a Label div in the HTML apps/files/templates/list.php:40
edit2
/edit2
Add some CSS for positioning.
edit2
Css file at file/css/upload.css, insert e.g. after line 62.
/edit2
Finally set the Progress text, too, while updating the bar: file-upload.js:466 again
Regarding the upload speed:
Maybe the
dataobject has such information already.Else you could set a timer here and do the math yourself.
Note: this is non-tested code! (but it could work)

I only tested the html and the css:
Mainlybecause that ajax part is not easily editable with Firebug, don't want to download all the code and have no time to set up a test server. Also I have no experience with pull requests.
Aaand I should be learning for some exams, lol.
Final note: some code here is from this reference: http://jqueryui.com/progressbar/#label
Edit:
Or maybe with a custom change function?
enoch85 commentedon Aug 9, 2014
@luckydonald Woha! 👍 You are on to someting here.
@PVince81 Care to make a pull of this? Pls :)
luckydonald commentedon Aug 9, 2014
Ok found it, in the wiki of the used blueimp/jQuery-File-Upload plugin:
From the data object we can get
But there is only
data.bitrateas example, so I'm not sure how the other objects are named.Also, if it delivers "Percentage of uploaded bytes", do we need to do that calculations in file-upload.js:466 by ourself?
Edit: it seems to come as string, probably like
12%, so never mind.enoch85 commentedon Aug 9, 2014
@PVince81 Which files does this concern, and have to be changed?
enoch85 commentedon Aug 9, 2014
@luckydonald Or do know which files that have to be changed in the core to fix this? You showed an example before, what changes did you do and to what files?
A pull request is simply making that changes in the core and then make a pull request of it. Maybe @karlitschek can explain? It would be a good start, and other programmers can discuss and improve the code.
5 remaining items
luckydonald commentedon Aug 10, 2014
&%¶@¢!
XXAMP seems to have problems with the folder stucture, having an own lib folder or something like that.
Okey because I wanted progress, just used one of my domains instead.
I am fiddleing around with formating, but it basicly works.
You can have a look by yourself.
user: test
pw: bla
http://flutterb.at/owncloud-testserver
(such secure)
Just delete your uploaded test files afterwards.
Your files looks good, I am still working on some improvements.
enoch85 commentedon Aug 10, 2014
Nice!! A little too much information though.
I think it should be like 12 of 93 MB. 10 Mbit/s
enoch85 commentedon Aug 10, 2014
Btw, @luckydonald could you please make the changes in the code here: https://github.com/luckydonald/core and then create a new pull request? I made one already but it´s easier if you make the changes and push make a PR. Or, you can just make the changes in your core, and I can make a new PR. :)
luckydonald commentedon Aug 10, 2014
Finally got it working. Is a bit hax because of the used .progessbar() part.

Looking now through the files to collect the changes I made.
Also @enoch85 I cant open (edit) the "write here.odt", getting javascript errors.
So please don't remove it, so I can file a bug, if reproducable.
enoch85 commentedon Aug 10, 2014
Yes, it looks very good!
Please add the changes here: #10324
luckydonald commentedon Aug 10, 2014
Eventually I got my git working.
#10326
enoch85 commentedon Sep 6, 2014
Any progress here @luckydonald ?
enoch85 commentedon May 11, 2016
@luckydonald Do you think you could take a look at this again please?
lock commentedon Aug 4, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.