Server side Image Upload in TinyMCE Editor using PHP

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 11

  • @Dontbeabadguy
    @Dontbeabadguy 2 года назад +3

    To me it's not working, the image upload correctly, but receive a specific name and not appearing in the text area.

  • @serrao1394
    @serrao1394 11 месяцев назад

    In localhost it runs fine but not in the server

  • @nukeman4
    @nukeman4 2 года назад

    Can you do tutorial for videos?

  • @kavishkahenderson5724
    @kavishkahenderson5724 Год назад

    How can we solve the issue where a user uploads an image named "image1.png", later deletes it, and replaces it with another image named "image2.png", but the storage or database system fails to delete the previously deleted "image1.png" so that database have Two images but we are using only one. any solution?

  • @suntoes
    @suntoes Год назад

    Cool stuff

  • @faizaninchina
    @faizaninchina 2 года назад

    its not working on live server

    • @adetyaernanda1897
      @adetyaernanda1897 Год назад

      me too not working, why can u solve?

    • @lazis
      @lazis Год назад

      Delete/comment code with start if(isset($_SERVER['HTTP_ORIGIN']... until if end

  • @dchubad
    @dchubad Год назад +2

    Sorry, nothing impressive about this script at all. Upload an image then delete the image from the text editor, but it still remains in the upload folder. There is no image management at all. If you upload several images and remove one or more from the editor, it keeps all the uploaded images in the upload folder. In reality, when images are uploaded to the editor each image should be renamed to something like a hash.ext and then when the person has finished editing then click a save button, the content of the editor should be saved to the target location such as a db and then the images should be uploaded right after. The editor should only contain the image hashname.ext and not the actual image. When a person wants to go back and edit anything at a later date, the editor should load up the info from the db where the image links point to each photo uploaded in the upload directory. Each time they save, the directory containing all the uploaded images should be destroyed and a new directory should be created (to flush out any stray images).

    • @surfingcipher1059
      @surfingcipher1059 6 месяцев назад

      so can u do a tutorial on this then?

    • @atribhattacharyya2631
      @atribhattacharyya2631 6 месяцев назад

      Images itself from the folder are not meant to be deleted from the text editor. In text editor you can re-use your previously uploaded images. You can only delete a file like image from a file manager, not from text editor. You can re-use a same image in different text areas in your website. (Like about us, gallery etc.) so as per your logic, if you delete the image from about us text editor, the image will be unavailable through various pages which had used it.