Kok,
You should be able to do this with no problem. I would look at:
http://lxr.mozilla.org/seamonkey/source/extensions/xml-rpc/src/nsXmlRpcClient.js#157
Which creates an upload stream and POSTs to it in Javascript.
-Adam
Kok Hoor , SolutionX wrote:
Hi all,
While browsing thru the newsgroup, I noticed a message entitled:
Re: downloading a file via HTTP w/ XPCOM and JS
Is it also possible to post files via 'multipart/form-data' or some
other methods (direct sending of raw bytes), directly to the server?
The problem I am facing is, I tried to use nsIScriptableInputStream
For this purpose. Unfortuncately, I can't simple send an entire stream
without
processing it, as calling the read command and sending resulting binary
Bytes to be truncated ( '\0' signifies the end of string ).
So I wonder if I can simple send a file over without resorting to
nsIScriptableInputStream, but perhaps some other XPCOM components
Regards,
Kok Hoor