469,328 Members | 1,301 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,328 developers. It's quick & easy.

get filesize using javascript

I there!

I would like to know if there is anyway to get the filesize of one
particular file in the local filesystem.
I heard about a solution using ActiveX but obviously it only works in
IE.

Thnks a lot ,

Sérgio Silva

Apr 19 '06 #1
3 7000
trapman said the following on 4/19/2006 4:21 PM:
I there!

I would like to know if there is anyway to get the filesize of one
particular file in the local filesystem.
No.
I heard about a solution using ActiveX but obviously it only works in
IE.


More specifically, IE for Windows, and then it only "works" if the user
allows full access to the File System.

Otherwise, ask the user:

var fileSize = prompt('What size is file ABC.EFG?','FileSize');

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 19 '06 #2
Well asking the user isn't an option.

Even with IE 6 i need to have the server url on the trusted sites. I
believe that the default internet zone is actually not allowing
creation of ActiveX objects :/

Thnks a lot though!

Apr 19 '06 #3
trapman said the following on 4/19/2006 4:40 PM:
Well asking the user isn't an option.
Why? Is it some file the user wouldn't want you looking at?
Even with IE 6 i need to have the server url on the trusted sites.
Ummm, ok.

I believe that the default internet zone is actually not allowing
creation of ActiveX objects :/


No, it doesn't. It prompts for the use of ActiveX

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Apr 19 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Phil Powell | last post: by
4 posts views Thread by Marek Möhling | last post: by
2 posts views Thread by IWP506 | last post: by
4 posts views Thread by Ken | last post: by
3 posts views Thread by Arjen | last post: by
3 posts views Thread by mosscliffe | last post: by
2 posts views Thread by Eric Layman | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Purva khokhar | last post: by
reply views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.