Hi folkes!

I use a for loop to determine the size of all files together:

totalsize = 0;

desktop.openFiles(
    function(files) {
        for(var i = 0; i < files.length; i++) {
            totalsize += files[i].blob.length;
        }
    },

    options
);

during upload event the code calculates the number of bytes it
actually uploads, using this piece of code:

var totalloaded += event.loaded;
console.log('loaded: ' + totalloaded + ' / ' + totalsize ' bytes');

in the end this logs the following, and I'm sure that is
mathematically impossible!

>>> loaded: 12210021 / 1004508 bytes

that's kinda impossible innit?

  1004508 total
12210021 loaded

How can this be explained?
I need it to calculate the percentage of the progress bar of all the
files together...

thanx for help!
Fabian

Reply via email to