...

View Full Version : File Size



newboy
04-04-2003, 12:44 PM
Hello to All
I want to get fileSize of an image By Javascript!
is that possible ?
and if not, in which language i can do it?

Graeme Hackston
04-04-2003, 01:44 PM
Offline in IE


fso = new ActiveXObject("Scripting.FileSystemObject")
fso.GetFile('C:\\some_file.ext').size


From the web I don't know of anything. There was a thread on this forum a few months back where someone was roughly detecting conection speed by timing how long an image of a specific size took to download. You might be able to use that then compare it to your files download time to get a rough idea. Just a guess and it won't be acurate.

<edit> included missing quotes in GetFile </edit>

newboy
04-04-2003, 02:52 PM
Thanks for guide
Can u give me that URL
I can't found it

Graeme Hackston
04-04-2003, 03:01 PM
I did a search and couldn't find it either but I found this

http://www.brothercake.com/scripts/modemspeed.php



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum