To upload the file using JavaScript generally iFrame approach is used in which Hidden iframe is maintained and then the file is uploaded using the iframe.
However it is said not to be reliable method for the file upload and Flash is used for this purpose. So i am not clear how this is done? I mean by Flash and JavaScript together ?
Also i would like to know if in case there are any other approaches for file upload? like on client side read the file convert into binary data and then send it across or something like that.
Thanks all,
With ExternalInterface (or, more usually, through a pre-rolled Flash object such as YUI Uploader which does all that for you).
Java. ActiveX.
They use the same principles as Flash, but have weaker support.
The file is already binary data (unless it is a text file), but read it … how? JavaScript doesn’t have access to the filesystem in a standard security context.