Trying to understand image paste architecture in editor for 2.1 RC3

Started by bluevoodu, May 30, 2021, 09:00:08 PM

Previous topic - Next topic

bluevoodu

I searched the community... either my terms are not right, or I Couldn't find what I'm looking for.  I started playing around with 2.1 RC3.  The screenshot and then pasting an image in the editor worked pretty well. Cudos to getting this work as these are important features moving forward.

I have used Drupal and updated the ckeditor to do this same functionality.  I've also used Xenforo with these features. It's been 2-3 years since I last did this, so I could be incorrectly remembering how it functioned.  I thought there were ways  to store the images in certain specific file paths.   I am not sure where the images are being stored for smf 2.1 rc3, but it appears they are not being stored in folders after a few tests.  They appear to be converted and stored in the database?  I'm still looking at where this is.  I had to "up" the text in a post to over 20k characters to make it possible to do screenshots.  Multiple screenshots will require a bigger bump.

Am I correct on this?  or how are the images being stored? 
We want you to join:
Chicken Dinner Gaming Community

GL700Wing

On my SMF 2.1 RC3 forums message attachments are stored in the directory/folder configured in Administration Center -> Attachments and Avatars -> Attachment Directories .
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

live627

Images pasted into the editor are encoded into base64 and saved in the database.

GL700Wing

Quote from: live627 on May 31, 2021, 06:35:09 AM
Images pasted into the editor are encoded into base64 and saved in the database.
Would you please let me know how this is done - I can't find out how to paste images into the editor and from what I read here it is not yet a core feature ...

I've uploaded plenty of attachments on an SMF 2.1 forum but they've all been stored in the attachments folder and I can't work out how to configure SMF to store them in the database ...
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

GL700Wing

Quote from: GL700Wing on June 01, 2021, 06:48:05 AM
Quote from: live627 on May 31, 2021, 06:35:09 AM
Images pasted into the editor are encoded into base64 and saved in the database.
Would you please let me know how this is done - I can't find out how to paste images into the editor and from what I read here it is not yet a core feature ...

I've uploaded plenty of attachments on an SMF 2.1 forum but they've all been stored in the attachments folder and I can't work out how to configure SMF to store them in the database ...
I just worked it out - I can't drag and drop images into the text box area unless I toggle the source view to WYSIWYG mode ...
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

GL700Wing

Quote from: GL700Wing on June 01, 2021, 07:17:17 AM
I just worked it out - I can't drag and drop images into the text box area unless I toggle the source view to WYSIWYG mode ...
Although I've just discovered that when I try and post a message containing a large image (eg, 4960px x 3500px, 10.5Mb) I consistently encounter the following error condition (ie, all the message text and the image(s) disappear) and there is nothing logged in either the forum error log or system error log ...

That said, I can upload the same image as an attachment without any issues ...
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Kindred

yes... it's a limit of drag and drop at this time.

Drag and drop are not actually attachments. They are encoded into the message....   which may over-run your message size limit.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

GL700Wing

Quote from: Kindred on June 01, 2021, 09:16:19 AM
yes... it's a limit of drag and drop at this time.

Drag and drop are not actually attachments. They are encoded into the message....   which may over-run your message size limit.
Is it possible to have the WYSIWYG editor enabled without the drag and drop feature for attachments also being enabled?

Also, I had set the message size limit to 0 (which required running the database maintenance function "Convert to TEXT" to convert the body column in the messages table to MEDIUMTEXT) - where would other message size limits be configured?
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

GL700Wing

Quote from: GL700Wing on June 01, 2021, 06:41:59 PM
Also, I had set the message size limit to 0 (which required running the database maintenance function "Convert to TEXT" to convert the body column in the messages table to MEDIUMTEXT) - where would other message size limits be configured?
Correction - I ran the database maintenance function "Convert to MEDIUMTEXT" to convert the body column in the messages table to MEDIUMTEXT.
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Advertisement: