How do I get the video size from the path?

0

Please follow the image below:

Thevideosizeiswithin"context" (Path: context > Files : FileList > 0: File > size)

How do I get the size of the video from the path above?

    
asked by anonymous 30.11.2016 / 19:19

1 answer

1

If you want to get the size of the video and are using the same function as your other question , you can get by the size attribute that is returned in bytes. So to convert to MB:

var tamanho = (this.files[0].size/1024)/1024; // Bytes > KB > MB

JSFiddle: link

    
30.11.2016 / 19:29