I'm working with a form that uploads files and stores them in S3, using code such as the following:
$file = $request->file('photo');
$s3 = Storage::disk('s3');
$s3->put($key, file_get_contents($file));
If a file upload is a slightly larger size (seems to be around 2MB+) I get a completely empty response from the server (Chrome shows "No data received, ERR_EMPTY_RESPONSE, Unable to load the webpage because the server sent no data.)
I have no idea what may be causing this. There are no errors thrown, no errors in the PHP errors logs, and no response at all from the server. I can place a die() statement before the $s->put() and it will reach that. If I place it after, I get no response from the server. This is only for files 2MB+ in size, smaller files work fine with no issues.
Any thoughts, ideas, or other things to try?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community