it could be the mime-type or the column table size, be sure to not truncate the input. If using a blob column type then this can support up to 65536 bytes. To save more data use mediumblob which supports up to 16MB or longblob which supports up to 4GB.

The same applies if you're saving them as encoded strings, use mediumtext or longtext instead of text.