ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Martin" <pbweb...@gmail.com>
Subject Re: Can we save the Path to the file with File name in a cookie
Date Fri, 06 Oct 2006 14:09:49 GMT
My experience in the past is that the browser doesn't allow you any
control of <input type="file"...> since it could be easily abused.
Someone could place it on the form hidden, prepopulate it with any
filename and when the user clicks submit, they could get any file on
the user's box.

I poked around a bit because I figured this is something that could be
done in AJAX.  Sure enough, there is the capabilities of doing it,
scary though because what I warned about can be done...

Check out this article: http://www.15seconds.com/issue/010522.htm

They take and create a XML doc in javascript, import a file locally
and then post the XML.

 ado_stream.Type = 1;  // 1=adTypeBinary
   // store file content into XML node
   l_node1.nodeTypedValue = ado_stream.Read(-1); // -1=adReadAll



View raw message