Este es mi código:
$credentials = $this->container->getParameter("alfresco_user") . ":" . $this->container->getParameter("alfresco_password");
$url = "http://";
$url .= $this->container->getParameter("alfresco_url");
$url .= ":";
$url .= $this->container->getParameter("alfresco_port");
$url .= "/alfresco/service/api/upload";
$postvars = array(
'filedata' => '@'. "/home/angel/Escritorio/" . $request,
'siteid' => 'ayudatecnica',
'containerid' => 'documentLibrary',
'uploaddirectory' => '/actabrigadista',
'description' => 'Acta de entrega de Brigadista a Beneficiario ',
'contenttype' => 'application/pdf',
'majorversion' => 'true',
'overwrite' => 'true',
'thumbnails' => 'true'
);
$headers = array(
'Content-type:application/pdf',
"Authorization: Basic " . base64_encode($credentials)
);
$curl_request = curl_init();
curl_setopt($curl_request, CURLOPT_URL,$url);
curl_setopt($curl_request, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl_request, CURLOPT_HTTPHEADER, $headers);
curl_setopt($curl_request, CURLOPT_POST,true);
curl_setopt($curl_request, CURLOPT_POSTFIELDS,$postvars);
$result = curl_exec($curl_request);
echo "<pre>";
print_r($result);
Porqué me sale el error:
{
"status" :
{
"code" : 500,
"name" : "Internal Error",
"description" : "An error inside the HTTP server which prevented it from fulfilling the request."
},
"message" : "11020341 Unexpected error occurred during upload of new content.",
"exception" : "",
"callstack" :
[
],
"server" : "Community v5.2.0 (re21f2be5-b22) schema 10.057",
"time" : "02/12/2018 18:04:56"
}
Por favor su ayuda.
En el log de Alfresco encontrarás una explicación más detallada del error.
https://community.alfresco.com/groups/spanish-user-group/blog/2018/05/02/tutorial-comunidad-ayuda
Discussions about Alfresco Content Services and Alfresco Process Services in Spanish
Related:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.