I'm trying to download files of different types in a database's blob
column.
When I open files and images, all the files are empty.
What's going wrong?
$file = DB::table('files')->where('id', $fileId)->get()[0];
header("Content-length: $file->file_size");
header("Content-type: $file->file_type");
header("Content-Disposition: attachment; filename=$file->file_name");
ob_clean();
flush();
echo $file->file;