How to get numbers of file in q-uploader
-
I tried to use
@add
and@remove
function to get numbers of file.It has a file object as parameter.
I usefile.length
,but just can get numbers of file i chosed in windows explorer.
How to get total of file in the q-uploader. -
I haven’t used q-uploader, but when I tried this out, this is what I did:
In my template:
<q-uploader multiple :url=“url” @add=“uploadAdded”/>Then in my Vue code:
methods: {
uploadAdded (file) {
console.log(‘file.length’, file.length)
}
}I choose 2 text files from my computer, and I saw “file.length 2” appear in my console.
Do you see any errors when you run your code?
Did you add this component into the components area of the ‘quasar.conf.js’ file?
-
@somascope
I tried that too .
Use the@add
and@remove
to count.I still think some where in q-uploader still can get it.