correct parameters for file.save and node.save to create a new node with a cck imagefield?

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
roo's picture

OK, have got file.save working with jsonrpc post content like:

method="file.save"&params={
"file":{
"file":"BASE64STUFF",
"uid":"5",
"timestamp":"1269406525",
"filename":"test.jpg",
"filepath":"sites/default/files/test.jpg"
},
"sessid":"3qbg2lv0bpjlfve3vim0b7t627"
}

and a subsequent node.save with jsonrpc post content like:

{
"field_image": [ {"0": {"fid":"25"} } ],
"uid":"5",
"title":"test node",
"type":"cardobject"
}

Which creates the node with no errors, but I cannot seem to attach the uploaded file to the node, and it does not return an error message for the file description to tell me what is missing or wrong.

What is the correct format and minimum fields for attaching the image to the cck field please? Surely we don't have to supply the filename/path/size and other stuff all over again do we?

Andrew