Right now when uploading in the web interface the usual upload percentage and remaining time is shown. I was wondering if it’s possible to display the actual upload speed in kb/s while uploading to give the user a better idea on the servers current performance. This would be useful to maybe postpone a large file upload to a later time or just resort to other means of transferring files if a cloud synchronisation isn’t really necessary at the time. I tried playing around in the php.ini but I couldn’t find any option or other helpful posts on this topic. Every answer is greatly appreciated!
Also, if this is not an actual option provided in Nextcloud right now, is there a way for me to suggest it as a feature?
System info:
Nextcloud Version 11.0.2 stable
Ubuntu 16.04 Xenial
Apache 2.4.18
PHP 7.0.15
That sounds like an interesting feature. I don’t think it’s possible right now (without modifying the code), but you could request it on Github by adding a new issue and writing the specific details about what you want and why it would be useful.
I came across this while looking for the same thing.
I couldn’t find an answer to this so looked into it and this is how I got it working.
Nextcloud 14.0.4 / Ubuntu 18.04.1 LTS + MATE
All we are going to do is add lines to a file which will replace the displayed time remaining data with upload data.
Method - you’ll need admin access for this:
goto the folder of the file location:
cd /var/www/html/nextcloud/apps/files/js/
make a backup copy of the upload file
sudo cp file-upload.js file-upload.js-original
edit the upload file
sudo nano file-upload.js
I’m using nano text editor, use whatver floats your boat
NB: in nano - pressing Ctrl + C will show you the current line number, and Alt + G will prompt for a line number to jump to
goto line 1139, you want to find this line:
var h = moment.duration(smoothRemainingSeconds, "seconds").humanize();
if (!(smoothRemainingSeconds >= 0 && smoothRemainingSeconds < 14400)) {
// show "Uploading ..." for durations longer than 4 hours
h = t('files', 'Uploading …');
}
this is displaying the upload information
after the above line add one of the following as required:
a) xfr speed after the time remining:
// add xfr speed to time remaining
h = h + t('files', ' @ {bitrate}' , {
bitrate: humanFileSize(data.bitrate / 8) + '/s'
});
// ========================================
b) xfr speed replaces time remaining:
// xfr speed replaces time remaining
h = t('files', '{bitrate}' , {
loadedSize: humanFileSize(data.loaded),
totalSize: humanFileSize(data.total),
bitrate: humanFileSize(data.bitrate / 8) + '/s'
});
// ========================================
c) uploaded of total size and xfr speed replaces time remaining:
(image would be as per Marcel_Panac's above)
// uploaded of total size and xfr speed replaces time remaining
h = t('files', '{loadedSize} of {totalSize} ({bitrate})' , {
loadedSize: humanFileSize(data.loaded),
totalSize: humanFileSize(data.total),
bitrate: humanFileSize(data.bitrate / 8) + '/s'
});
// ========================================
To return to the original display, comment out or delete the added lines.
has anyone of you tried the described above with Version 16?
I tried a lot, asked google, but I can’t get to run it.
There is an upload speed but in something like bit per second.
It would be better to get it in MB/s or GB/s.
Thanks for any tipp or link to information.
This is my very fist question to this community.
Please don’t hesitate to let me know in the case I miss any of the good community rules.
Hi wicki,
thanks for your answer.
This is what I get:
Code from Line 1164:
var h = moment.duration(smoothRemainingSeconds, “seconds”).humanize();
if (!(smoothRemainingSeconds >= 0 && smoothRemainingSeconds < 14400)) {
// show "Uploading ..." for durations longer than 4 hours
h = t('files', 'Uploading …');
// add xfr speed to time remaining
h = h + t('files', ' @ {bitrate}' , {
bitrate: humanFileSize(data.bitrate / 8) + '/s'
});
}
Any idea?
Could you send me your modified code.
Testing with Opera, Firefox, Edge.
I rebooted the server - no change.
Maybe there are server settings to modify? Modules to install/aktivate?
How can I check this?
var h = moment.duration(smoothRemainingSeconds, "seconds").humanize();
if (!(smoothRemainingSeconds >= 0 && smoothRemainingSeconds < 14400)) {
// show "Uploading ..." for durations longer than 4 hours
h = t('files', 'Uploading …');
}
// add xfr speed to time remaining
h = h + t('files', ' @ {bitrate}' , {
bitrate: humanFileSize(data.bitrate / 8) + '/s'
});
Just compare your code and Drussius code once again…
You see what I see?
Hi, I want the same functionality in my Nextcloud version 27 where upload speed must be shown in the progress bar, I have tried a lot and spent over a week, but no success. Please someone help me to achieve me to get this functionality.