ho trovato questo nel manuale..

CURLOPT_POSTFIELDS The full data to post in a HTTP "POST" operation. To post a file, prepend a filename with @ and use the full path. This can either be passed as a urlencoded string like 'para1=val1&para2=val2&...' or as an array with the field name as key and field data as value. If value is an array, the Content-Type header will be set to multipart/form-data.

e ho fatto come richiesto:

$fields = array('action' => 'document.upload',
'apiKey' => $apikey,
'name' => 'racing',
'title'=>'Race Cars',
'signature'=>$str);

function doPut($url,$fields,$file)
{
$fields = (is_array($fields)) ? http_build_query($fields) : $fields;

if($ch = curl_init($url))
{
$fp = fopen(@$file, "r");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
curl_setopt($ch, CURLOPT_PUT, true);
curl_setopt($ch, CURLOPT_INFILE, $fp);
curl_setopt($ch, CURLOPT_INFILESIZE, filesize($file));
curl_setopt($ch, CURLOPT_UPLOAD, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Length: ' . strlen($fields),'Content-Type:multipart/form-data'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

print(curl_exec($ch));

$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);

$t = curl_close($ch);

}
else
{
return false;
}
}


ma il webservice non trova il campo "action"