i working on website use dmcloud streaming videos. now, have form got files input. upload videos on website, move file dmcloud php, delete it.
it's kind of stupid, , make me lost lot of bandwidth.
on doc, have seen : https://www.dmcloud.net/doc/api/api-upload.html trying use it. have set action of form on url function returns me. every time submit form, dmcloud anwsers me : { "error": "missing file" }
so how can tell him, document want upload on dmcloud ? can send request ajax ? can multi-videos upload on same form ?
edit : here code, not think can help. dont know how so, code stupid , useless , not work ... on 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 view got basic form, lot of inputs. method="post" enctype="multipart/data", , action values $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>
Comments
Post a Comment