dropzone icon indicating copy to clipboard operation
dropzone copied to clipboard

Progressbar gets to 100% before uploading finishes in latest Chrome. Uploadprogress function gives 100 as progress.

Open fan-wen opened this issue 2 years ago • 2 comments

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.

fan-wen avatar Apr 19 '22 03:04 fan-wen

Anyone encounters the same issue or is it just me?

fan-wen avatar Apr 30 '22 03:04 fan-wen

Yeah I've had that problem too. Firefox and Chrome. Never found a solution.

jordanade avatar May 18 '22 23:05 jordanade