I'm using file uploading for images into a BLOB in a MySQL database, for some reason when I upload some pictures I noticed they weren't completely rendered, I then tried uploading directly into PHPMyAdmin when it then showed (Max: 64KiB)
I luckily enough run my own server so I thought to go check my php.ini for max file upload size, it's set to 250MB. So my question is,
Where is the max filesize for MySQL BLOB Uploads??
BLOB: Can handle up to 65,535 bytes of data. MEDIUMBLOB: The maximum length supported is 16,777,215 bytes. LONGBLOB: Stores up to 4,294,967,295 bytes of data.
A BLOB (binary large object) is a varying-length binary string that can be up to 2,147,483,647 characters long.
A Binary Large Object ( BLOB ) is a MySQL data type that can store binary data such as images, multimedia, and PDF files.
LONGBLOB: A binary large object column with a maximum length of 4294967295 (2^32 - 1) bytes, or 4GB in storage. Each LONGBLOB value is stored using a four-byte length prefix that indicates the number of bytes in the value.
It depends on the type of your column.
From MySQL documentation:, section Storage Requirements for String Types:
TINYBLOB
L+1 bytes, where L < 28(256 bytes)
BLOB
L+2 bytes, where L < 216(65 kilobytes)
MEDIUMBLOB
L+3 bytes, where L < 224(16 megabytes)
LONGBLOB
L+4 bytes, where L < 232(4 gigabytes)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With