Install a component using Upload Package File
The progress bar should display the current file upload progress
The progress bar stays at 0% through the upload.
MySQL 5.6.49
PHP 7.4.11
Apache
litespeed
Joomla! 4.0.0-beta5-dev Development [ MaƱana ] 15-September-2020 19:15 GMT
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36
In core.js there does not appear to be support for uploadProgressCallback
Labels |
Added:
?
|
Adding the below onBefore
should fix this.
Joomla.request({
url: uploadUrl,
method: 'POST',
perform: true,
data: data,
headers: {
'Content-Type': 'false'
},
onBefore: function(xhr) {
progressBar.style.width = 0; //progressBar.css('width', 0);
progressBar.setAttribute('aria-valuenow', 0); //progressBar.attr('aria-valuenow', 0);
percentage.textContent = '0'; // percentage.text(0);
// Upload progress
xhr.upload.addEventListener("progress", function (evt) {
if (evt.lengthComputable) {
var percentComplete = evt.loaded / evt.total;
var number = Math.round(percentComplete * 100);
progressBar.style.width = number + '%'; //progressBar.css('width', number + '%');
progressBar.setAttribute('aria-valuenow', number); //progressBar.attr('aria-valuenow', number);
percentage.textContent = number; //percentage.text(number);
if (number === 100) {
dragZone.setAttribute('data-state', 'installing'); //dragZone.attr('data-state', 'installing');
}
}
}, false);
return xhr;
},
Labels |
Added:
J4 Issue
?
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-07-10 08:24:45 |
Closed_By | ⇒ | Fedik | |
Labels |
Added:
?
Removed: ? |
@chmst this is actually a slightly different problem. The other posts are relating to installing Joomla. This relates to installing components and is a simple progress bar of the file upload not SQL install which will is working in Joomla 3 but broken in 4.