Hi,
I am writing the service to create a document on the content server (16.2) with PHP web application. I found the error {"error":"Could not process object, invalid action \u0027create\u0027"}.
Could you please advise me how to write the service to upload the document through custom web application?
Here is the code
$fields = [
'type ' => 144,
'parent_id' => $nodeid
'name' => $fileName,
'file' => $file
];
$headers = array( 'OTCSTicket: '.$ticket,
'Content-Type: application/x-www-form-urlencoded;');
$tmeCommand2= curl_init('http://localhost/alpha/cs.exe/api/v2/nodes');
curl_setopt($tmeCommand2, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($tmeCommand2, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($tmeCommand2, CURLOPT_TIMEOUT, 10);
curl_setopt($tmeCommand2, CURLOPT_HTTPHEADER, $headers );
curl_setopt($tmeCommand2, CURLOPT_HEADER, false);
curl_setopt($tmeCommand2, CURLOPT_POSTFIELDS, $field);
curl_setopt($tmeCommand2, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($tmeCommand2, CURLOPT_RETURNTRANSFER, true);
curl_setopt($tmeCommand2, CURLOPT_VERBOSE, true);
$raw_response = curl_exec($tmeCommand2);