dropzone
dropzone copied to clipboard
Progressbar gets to 100% before uploading finishes in latest Chrome. Uploadprogress function gives 100 as progress.
Describe the bug The progress bar reaches 100% immediately before the uploading finishes. This behavior only happens in my Chrome (Version 100.0.4896.127 (Official Build) (arm64)), but it behaves normally in Safari. The progress bar works normally in Chrome before.
To Reproduce Upload any document in the latest Chrome
Here's my code:
$("#dZUpload_logo").dropzone({
url: "upload",
maxFilesize: 30, // MB
addRemoveLinks: false,
maxFiles: 1,
acceptedFiles: "image/*",
previewsContainer: "#file-previews",
previewTemplate: document.querySelector('#uploadPreviewTemplate').innerHTML,
uploadprogress: function(file, progress, bytesSent) {
if (file.previewElement) {
var progressElement = file.previewElement.querySelector("[data-dz-uploadprogress]");
progress = Math.ceil(progress);
progressElement.style.width = progress + "%";
progressElement.querySelector(".progress-text").textContent = progress + "%";
}
},
});
Expected behavior 100% progress right after you select the file
Browser / OS:
- OS & Device: MacOS
- Browser: Chrome
- Version: 100.0.4896.127 (Official Build) (arm64)
Additional context The progress bar works normally in Safari. The code works well in Chrome before.
Anyone encounters the same issue or is it just me?
Yeah I've had that problem too. Firefox and Chrome. Never found a solution.