brantje / nextnote

A full Evernote / OneNote style WYSIWYG note editor for Nextcloud / ownCloud. Join our telegram at: https://t.me/NextNote
GNU Affero General Public License v3.0
163 stars 19 forks source link

Saved parts too big - storing fails #29

Closed ThomasDaheim closed 6 years ago

ThomasDaheim commented 7 years ago

Wehn trying to save a note with an image ~3MB of size I get the following error in the log:

"An exception occurred while executing 'INSERT INTO ownnote_parts"
"Communication link failure: 1153 Got a packet bigger than 'max_allowed_packet' bytes"

Seems like the current parts size ($maxlength = 2621440; // 5 Megs (2 bytes per character)) is bigger than the allowed default: "The server's default max_allowed_packet value is 4MB". (https://dev.mysql.com/doc/refman/5.7/en/packet-too-large.html).

After increasing 'max_allowed_packet' it works. But still I think the default for nextnote should be in sync with the default of MySQL...

brantje commented 7 years ago

The allowed site of the note field is configured here. Can you change it or do you want me to change it?

ThomasDaheim commented 7 years ago

Would be nice if you could change it. I would want to focus on the folder support.

ThomasDaheim commented 7 years ago

BTW How about that occurrence: https://github.com/brantje/nextnote/blob/master/lib/Utility/Utils.php#L59 Is the same done in two places?

brantje commented 7 years ago

Good find! Will adapt the service to make use of the Utils

enoch85 commented 6 years ago

Welcome back @brantje! :)