php - How to upload video from local pc in ckeditor? -


please advice me how upload video(.flv,mp3,etc) in ckeditor using ckfinder in php.

if have demo please provide link.

instead of ckfinder if have better option(plug in), please give me demo link , advice me how integrate?

thanks

you have set few parameters in ckeditor config point uploading script:

filebrowserbrowseurl: "index.php?route=filemanager/index", filebrowserimagebrowseurl: "index.php?route=filemanager/index", filebrowserflashbrowseurl: "index.php?route=filemanager/index", filebrowseruploadurl: "index.php?route=filemanager/index", filebrowserimageuploadurl: "index.php?route=filemanager/index", filebrowserflashuploadurl: "index.php?route=filemanager/index" 

and in php file save file:

public function index() {     $file = !empty($_files['upload']) ? $_files['upload'] : null;     $fileurl = '';      if (!empty($file) && !empty($_get['ckeditor']) && !empty($_get['ckeditorfuncnum'])) {         if (!move_uploaded_file($file["tmp_name"], $targetfile)) {             $error = 'failed upload file.';         } else {             $fileurl = "http://example.com/uploads/file_name.png";         }     } else {         $error = 'not authorized';     }      echo <<<js <script type="text/javascript">     window.parent.ckeditor.tools.callfunction({$_get['ckeditorfuncnum']}, '{$fileurl}', '{$error}'); </script> js; } 

Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -