so i try to make a server that can be provide user to download some file(.xlsx) from server. My problem is why when I was completing downloading file from the server, the file can not be open?
this is my code:
Route::get('/dl/{filename}', function($filename)
{
//get file name and the file path
$path = "assets/.../".$filename;
if (file_exists($path))
{
//download the file
return Response::download($path, $filename, [
'Content-Length: '. filesize($path)
]);
}
else
{
exit('no file');
}
});
this is the pic Error msg from excel
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire