在dmcloud上传

I am working on a website where I use DMCloud for streaming videos. For now, I have a form which got some files input. I upload videos on my website, then I move the file to DMCloud with PHP, then I delete it.

It's kind of stupid, and make me lost lot of bandwidth.

On their doc, I have seen that : https://www.dmcloud.net/doc/api/api-upload.html So I am trying to use it. I have set the action of my form on the url that the function returns me. But every time I submit the form, dmcloud anwsers me : { "error": "missing file" }

So how can I tell him, which document I want to upload on DMCloud ? Can I send the request with ajax ? Can I do multi-videos upload on the same form ?

Edit : Here is some code, but I do not think it can help. I even dont know how to do it so, my code is stupid and useless and do not work ... On my Controller :

$CloudKey=new CloudKey('503660c394a6f6067c0005c3','bb36a94fb64388417172d5f1f93453b3996627a5');
$CloudKey->file=$CloudKey->__get('file');
$action=$CloudKey->file->upload(array('status'=>true,"target"=>"http://www.carpediese.fr/?tamere=1"));
    $action=$action->url;

And on my view I got a basic form, with lot of inputs. With method="post" enctype="multipart/data", and the action which values as my $action var.

PHP:

require_once 'CloudKey.php';

$cloud_key = new CloudKey('503660c394a6f6067c0005c3','bb36a94fb64388417172d5f1f93453b3996627a5');
$action_url = $cloud_key->file->upload(array('status'=>false,'target'=>'http://www.carpediese.fr/?tamere=1'))->url;

HTML:

<form enctype="multipart/form-data" method="post" action="<?=$action_url?>">
    <input type="file" name="file" />
</form>