data to alfresco with php 5.4.3
Hi I have a problem when I can try to upload a file with properties and metadata to alfresco 5.2 using php 5.4.3, this is my code:
curl_setopt_array($curl, array( CURLOPT_PORT => "8080", CURLOPT_INFILESIZE => filesize($lo_document['tmp_name']), CURLOPT_URL => "http://localhost:8080/alfresco/api/default-/public/alfresco/versions/1/nodes/-root-/children", CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $pam['body'], CURLOPT_HTTPHEADER => array( "authorization: ".$la_auth['Authorization'], "accept: application/json", "content-type: multipart/form-data" ) ));
$pam['body'] is like this:
-----------------------60061ddb32c3445516be40d631852702 Content-Disposition: form-data; name="name" patatas.pdf -----------------------60061ddb32c3445516be40d631852702 Content-Disposition: form-data; name="nodeType" mutua:documentoMutualista -----------------------60061ddb32c3445516be40d631852702 Content-Disposition: form-data; name="filedata"; filename="CS-08940-00227056-1.pdf" Content-Type: application/pdf -----------------------60061ddb32c3445516be40d631852702--
This show this error:
{"error":{"errorKey":"No disk space available","statusCode":409,"briefSummary":"05140331 No disk space available","stackTrace":"For security reasons the stack trace is no longer displayed, but the property is kept for previous versions","descriptionURL":"https://api-explorer.alfresco.com"}}
But this error means one parameter or more are wrong but I don't know which,Server has a lot of disk space.
Any help? anybody works with ApiRest Alfresco 5.2 and PHP?
链接地址: http://www.djcxy.com/p/48900.html上一篇: 数据请求在PHP中使用cURL?
下一篇: 数据到php 5.4.3露天