I have one database table where images are stored as strings. I'm trying to get this field content and add it to ftp server as image.
$data = $tbExpenseFile->full_image;
$hash = Str::random(16);
\File::makeDirectory(storage_path().'/storage/'.$hash);
$tbFile = storage_path().'/storage/'.$hash.'/'.$tbExpenseFile->full_image_name;
\File::put($tbFile, $data);
It's working, but bigger images are not uploaded fully, 1/4 from image is visible and remaining part is gray. In ftp these image sizes are 1048576 == 1mb.
I'm trying to figure out what can be the limit, maybe database string read limit, because laravel put method uses file_put_contents, so i think the problem is not there.