예제 #1
-1
 function uploadFile()
 {
     if (isset($_FILES) && isset($_POST) && !empty($_FILES)) {
         // we need a better mime type checks i guess
         // $allowedFileExtension = array("avi", "mov", "mpeg", "flv");
         $tmpVideoName = md5(microtime());
         move_uploaded_file($_FILES['file_upload']['tmp_name'], Config::get('basedir') . "/public/upload/" . $tmpVideoName);
         $ffmpeg = new FFmpeg(Config::get('basedir') . "/public/upload/" . $tmpVideoName);
         $ffmpeg->getFileInformation();
         $ffmpeg->createThumbnail();
         $this->json = array("tmpFile" => $tmpVideoName);
     }
 }