Razuna curl (to upload video) using php


#1

hi
i try to convert razuna curl link using php to upload video into razuna
meta_upd = curl_init();

<?php curl_setopt_array( $meta_upd, array( CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => array( 'Expect: ' ), CURLOPT_URL => "http://localhost:8080/razuna/raz1/dam/index.cfm", CURLOPT_POST => 1, CURLOPT_POSTFIELDS => array( 'api_key' => "removed for privacy", 'fa' => "c.apiupload", 'destfolderid' => "033E60E858864B92828AAABD2CF9729C", 'filedata' => "output_final.mp4" ) )); // Send the request & save response to $meta_upd_resp $meta_upd_resp = curl_exec($meta_upd); echo $meta_upd_resp; ?>

server response =>
1Upload failed There was no appropriate FILE found in the upload

What is wrong please?
N.B : the output_final.mp4 is located at the same folder of my php files


#2

Hello,

have you resolved your problem?

I have the same error.

Thank you!


#3

Hi maciass ,

‘filedata’ => “output_final.mp4” --> is not correct.

It should be : ‘filedata’ => ‘@’.realpath(’./output_final.mp4’) or ‘filedata’ => new CurlFile(realpath(’./output_final.mp4’))

You can choose one of both commands as above depend on your web server which you are using.

Hope this helps.

Thanks