phpfile-uploadimage-uploadingfroala

how to change upload path in froala wysiwyg


I'm working on project which used Froala 2.4.0 WYSIWYG editor. I'm using xampp and localhost test. I can't use local path for upload images and files, all file and image upload in: https://i.froala.com/ But I want upload all file and image to http://localhost/uploads

How to do? I tried in froala website but I cannot do it.


Solution

  • for upload image :

    and add this script plugin to your editor page :

      <script type="text/javascript" src="froala_editor_directory/js/plugins/image.min.js">
    

    and edit "image.min.js" change imageUploadURL parameter to:

      imageUploadURL:"http://localhost/upload_image.php",
    

    and repeat all step for file upload :

    and add this script plugin to your editor page :

      <script type="text/javascript" src="froala_editor_directory/js/plugins/file.min.js">
    

    and edit "file.min.js" change fileUploadURL parameter to:

      fileUploadURL :"http://localhost/upload_file.php",
    

    Finally, if you get the error "Something went wrong, please try again", you should enable extension = php_fileinfo.dll,

    Good luck :)