Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > get filesize using javascript

Reply
Thread Tools

get filesize using javascript

 
 
trapman
Guest
Posts: n/a
 
      04-19-2006
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

 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      04-19-2006
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/
 
Reply With Quote
 
 
 
 
trapman
Guest
Posts: n/a
 
      04-19-2006
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!

 
Reply With Quote
 
Randy Webb
Guest
Posts: n/a
 
      04-19-2006
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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How check filesize using FileUpload control? VB Programmer ASP .Net 11 09-01-2012 09:05 AM
display filesize javascript using KDE konqueror linbox Javascript 0 01-20-2007 04:57 PM
Problem retrieving filesize David Colliver ASP .Net 0 05-17-2005 12:43 PM
Filesize limitations using cdoSendUsingPickup, cdoSendUsingPort Alan Howard ASP General 2 06-20-2004 12:44 AM
Format filesize in kB or MB Arjen ASP .Net 2 08-09-2003 03:56 AM



Advertisments