Interestingly, in essence:
public static final int maxContentSize = 2097152;
@Lob
@Column(length=maxContentSize)
private byte[] content;
@Column(length = 100)
private String mimetype;
@Column(length = 50)
private String fileName;
However, some files (size 65-70k) are inserted into the norm, but most of them get an error:
com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'CONTENT' at row 1
I checked before creating objects, the dimensions are correct.
source
share