-1

Can anyone tell me how to upload & store image in summer note in Yii2?

halfer
  • 19,824
  • 17
  • 99
  • 186
user2431224
  • 235
  • 3
  • 15

1 Answers1

0

As per i know when we upload an image in the summernote editor, the image is converted into BLOB(Binary large Object) and you can store this into a database with your other body text.

Khairul Islam
  • 1,207
  • 1
  • 9
  • 20
  • Do I need to write any separate code to store image in db as well as in a folder?Cause when I searched on google ,I found that it is stored by writing a separate ajax function ? – user2431224 Sep 15 '15 at 06:16
  • & How it will be fetched at the time of update if it is not stored anwhere? – user2431224 Sep 15 '15 at 06:17
  • No, no extra code or folder is needed. to understand how it will work at the update time you should practically test the summernote then you will understand better. – Khairul Islam Sep 15 '15 at 06:19
  • Yes , I 've tried it but image does not populate on update. – user2431224 Sep 15 '15 at 06:22
  • in my case images is populating in its perfect position! did you populate it into the summernote? – Khairul Islam Sep 15 '15 at 06:31
  • I've set dataType of column to BLOB.Still when I add image , saved & tried to view on update page, it shows blank.When I viewd the code it shows "


    ". that means image is not saved
    – user2431224 Sep 15 '15 at 06:45
  • what is stored in the database column when you upload an image? – Khairul Islam Sep 15 '15 at 07:00
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/89642/discussion-between-user2431224-and-md-khairul-islam). – user2431224 Sep 15 '15 at 07:02
  • https://stackoverflow.com/questions/21628222/summernote-image-upload this is may be helpful to you – Dhruv Jul 29 '22 at 16:43