I have one rvt file which is works fine with oss manager application, upload and translation work fine. but I upload same file through CURL call, file uploaded successful and I can see its listed in OSS manager app, but translation failed there. Seems like file is getting corrupt in uploading.
CURL call for file upload in PHP:
$headers = array
(
'Content-Type: application/octet-stream',
'Authorization: Bearer '.$access_token,
);
$post = array(
"file" => new CurlFile( 'manual.rvt' )
);
$ch = curl_init();
curl_setopt( $ch,CURLOPT_URL, 'https://developer.api.autodesk.com/oss/v2/buckets/testriz/objects/manual.rvt' );
//curl_setopt( $ch,CURLOPT_POST, true );
curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt( $ch,CURLOPT_HTTPHEADER, $headers );
curl_setopt( $ch,CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ch,CURLOPT_SSL_VERIFYPEER, false );
curl_setopt( $ch,CURLOPT_POSTFIELDS, $post);
$result = curl_exec($ch );
curl_close( $ch );