You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The $response->file() function should be removed or at least not be mentioned so heavily in the samples in the Readme. It is very bad practice to send files by just outputting them with php, php was not made for this and it should be preferred to redirect to the file using Location header.
It may work fine for small files, but it will make a lot of trouble for large files, especially with slow connections, since they will hit the max execution time of a php script. (This can be changed, but defaults to a very short time, about 30 seconds)
@Rican7 Is this going to be removed or refactored? I was trying to use $request->file() with an external url and it doesn't work at all, if you're keeping it I might go ahead and refactor it myself and submit a pull request.
The
$response->file()
function should be removed or at least not be mentioned so heavily in the samples in the Readme. It is very bad practice to send files by just outputting them with php, php was not made for this and it should be preferred to redirect to the file using Location header.It may work fine for small files, but it will make a lot of trouble for large files, especially with slow connections, since they will hit the max execution time of a php script. (This can be changed, but defaults to a very short time, about 30 seconds)
See "Why does readfile() exhaust PHP memory?" and "PHP readfile() and large downloads" and "Readfile() and large files"
The text was updated successfully, but these errors were encountered: