In PHP, there is a function named
GetRealVolume(filesize("FILEPATH"));
I seacrh one for javascript. Can i get the Filesize from a Filepath?
I want make a link like that:
<a href="FILEPATH">Klick for Download [FILESIZE]</a>
In PHP, there is a function named
GetRealVolume(filesize("FILEPATH"));
I seacrh one for javascript. Can i get the Filesize from a Filepath?
I want make a link like that:
<a href="FILEPATH">Klick for Download [FILESIZE]</a>
HTML5 allows you to do stuff like this through the File interface: http://www.html5rocks.com/en/tutorials/file/filesystem/#toc-file
so you can do:
fileEntry.getMetadata(function(metadata){console.log(metadata.size)})
The downside is that this would only work on your application sandbox, it is not that easy to access the general file system for security reasons, although you could give this atry: http://bytes.com/topic/javascript/answers/460516-check-file-size-javascript.
$.get("1234/docs/new/file.pdf", function(data){ console.log(data.size); }); but it doesn't work