I am using php curl to call open stack's api to store a object. My curl call looks like this
$token = $this->getToken();
$url = 'http://myfilestorageurl.com/v1/AUTH_volume/container/dummyfile.pdf';
dummyfile.pdf is the file name i want the stored file to be called.
$ch=curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'X-Auth-Token:'.$token,
'Content-Length: 5611', //not sure if its required
'X-HTTP-Method-Override: PUT', //not sure if its required
'Content-Location:/data/dummyfile.pdf'
));
curl_setopt($ch, CURLOPT_URL, $url_call);
curl_setopt($ch, CURLOPT_HEADER, TRUE);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
$response = curl_exec($ch);
The response keeps returning a 408 Request Timeout
Has anyone figured this out. Also am i specifying the file location to be uploaded correctly using the content-location header or is there another way to do.