Alodon's avatar

Can I upload text and image in one database column?{Illuminate\Http\Exceptions\PostTooLargeException}

I am using Summernote rich text editor to upload post to my website. Now When I try to insert an image using Summernote this show me some error like {Illuminate\Http\Exceptions\PostTooLargeException}

0 likes
7 replies
Alodon's avatar

No it's not working. I am trying to insert image and text to my database using summernote. When I add a image to the text box and click to create post this shows me the error.

Alodon's avatar

and also how many problems I can face if I save the images as base64?

Tray2's avatar
Tray2
Best Answer
Level 73

Lots.

Never store an image in the database or any other binary objects if it can be avoided.

Converting it to base64 will just use up your resources and make your tables huge and that decreases performance. It will increase the size of the image with around 20% (Tested with two different sized images).

Just store a link to the image in the database and the file on you desired file system.

Alodon's avatar

Hi, Thanks for your reply. Now how can I save summernote images to my server using laravel? or any other editor?

jlrdw's avatar

Seems like this has been answered, could you please show it as answered.

Please or to participate in this conversation.