Ah.
Another approach that I am considering is to uploat the file to the a
HTTP server and have that XML-RPC over to the XML-RPC server.
I already have to do a PHP proxy all my XML-RPC calls because Firefox
doesn't allow javascript to communicate with XML-RPC servers located
on the same host BUT different port number. So, passing the file to
the proxy first is another viable solution.
--- In jsolait@yahoogroups.com, "Jan-Klaas Kollhof" <keyjaque@...> wrote:
>
> yes and no,
>
> form within the browser it is not possible as you cannot read local
> files.
> From within windows scripting it should be possible as long as you can
> read the content of the file, which should work fine for text files
> but for binary it would be a bit difficult. Also the base64 encoder is
> not very fast in JS. The best thing would be to take an external
> program that turns your file into base64 encoded file, read the file's
> content into a string store that string inside an object that has a
> toXmlRpc() method which should return the xml-rpc code for base64
> encoded data, i.e. <base64> contentOfYourData </base64>
>
> you can then send the object as a paramert to the xml-rpc service
> like any other object
>
>
> Jan
>
> PS
> this might work as a data class
>
> var Base64Data=Class(function(publ,priv,supr){
>
> publ.__init__=function(data){
> this.data=data;
> }
>
> publ.toXmlRpc=function(){
> return "<base64>"+this.data+"</base64>";
> }
> });
>
>
> to use it just create a new object:
>
> var data = new Base64Data(base64_encoded_data)
> service.handleData(data)
>
>
> PPS: just found a little bug in the xml-rpc module that prevents it
> from receiving base64 encoded data if it is split up on multiple
> lines. though sending works just fine.
>