The file.name property is an inbuilt function of file WebAPI which gives the size of a file in bytes.
var size = instanceOfFile.size;
Return Value: It returns a number, containing the size of the file in bytes.
Supported Browsers: The browser supported by WebAPI File.name property are listed below:
- Google Chrome
- Internet Explorer
- PHP | filesize( ) Function
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.