Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

206.2 kB (204.8 kB loaded) prepended in LONGBLOB value

I'm saving files in my MySQL database on a LONGBLOB column and when I perform a select in my IDE I notice some of the base64 file content has the message 206.2 kB (204.8 kB loaded) prepended to it.

I'm using PHP to prepare the data and perform the inserts to the db:

$file = file_get_contents('path/to/file.pdf');
$encodedFile = base64_encode($file);

Does anyone know how is this happening?

like image 858
CIRCLE Avatar asked Jan 27 '23 14:01

CIRCLE


1 Answers

It turns out this is being imposed by the IDE I'm using, which is PHPStorm, to avoid memory exhaustion on the computer.

If I use mysql cli on the terminal all values show fine.

like image 137
CIRCLE Avatar answered Jan 30 '23 04:01

CIRCLE