I'm trying to download files of different type from Data Base from the Blob field. When i'm opening files and images, all files is empty. Can`t understand what is wrong here. Thank you for advice.
Here is example of my code:
$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;`
`
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire