[Javascript] Re: File Upload with Javascript (subject changed)

Ryan Cannon ryan at ryancannon.com
Tue Mar 8 11:05:43 CST 2005


> Hi
>  
> As everyone been mentioning doing this with javascript on his own not 
> going to work.
> But what you are trying to do might work if you include an Active X 
> into your page and call the method of this active X in the page I saw 
> an examples once of exactly what you want to do in an upload example 
> from a site who sell there component for the server, Sorry can't put 
> my hand on it anymore.
>  
> This tool might interest you however is not free. But sometime paying 
> a small fee might save you hours of endless coding.
> http://www.aspupload.com/xupload.html
>  
> Laurent

While in theory this could work, remember a couple things:

* ActiveX is IE-only, which is bad web design practice
* ActiveX is a security buzz-word right now, and firing up an ActiveX 
control unleashes all sorts of security warnings. Most users will be 
hesitant to say OK to the "This Might Blow Up Your Computer" warnings.
* Tampering with client-side files is bad, and should be avoided. *I* 
wouldn't like some company read files off of my computer. While 
readFile(passwords.txt); writeFile(virus.exe) might be over-the-top, 
readFile('addressbook.db'); isn't--you have no way of telling an ActiveX 
control which files they may and may not read.

Give a text warning next to the file upload and validate on the server 
side, giving an appropriate error message if the user still doesn't get 
it. Simple, accessible and cross-browser compliant.



More information about the Javascript mailing list