I want to doing a file uploader with a XMLHttpRequest, but when I want to process the upload in fuel, I have this error : "Fuel\Upload\NoFilesException [ Error ]: No uploaded files were found. Did you specify "enctype" in your <form> tag?" PHP return this fatal error on exec the \Upload::process method.
In my opinion, my HTTP request is correct : I have the content-type header is definied on "multipart/form-data; boundary=---------------------------211993223319997" and the datas of the header contain my file datas preceded by "-----------------------------211993223319997 Content-Disposition: form-data; name="file"; filename="720p_HD_Video.mp4" Content-Type: video/mp4".
My javascript code : request = new XMLHttpRequest(); request.open('POST', BASE_URL + 'admin/videos/upload.json'); var form = new FormData(document.getElementById('upload_form')); request.send(form);
My php code : public function post_upload() { $uploadConfig = array( 'ext_whitelist' => array('asf', 'asx', 'avi', 'divx', 'dv', 'dvx', 'flv', 'm4v', 'mov', 'mp4', 'mpeg', 'mpg', 'qt', 'wmv', '3g2', '3gp', '3ivx', '3vx'), // Get from DMC documentation 'path' => DOCROOT . 'medias' . DS . 'videos' . DS, ); /* Save the upload */ \Upload::process($uploadConfig); [...] }