Get Total File Size before upload

Started by benny-adiwijaya1 reply171 views
benny-adiwijayaOriginal post
#1

Hi, I need to get total file size before upload, right now I get total file size using

onBeforeUpload: function async(files) {
               
                let totalSize = 0;
                for (const [key, file] of Object.entries(files)) {
                    totalSize += file.size;
                }
}

Is there simple way to get total file size?

MerlijnTransloadit team
#2

Hi, no I don’t think there is a simpler way.