Hello all, I have a Laravel app that is responsible for storing uploaded files. I am working on the code for uploading and storing files. I've run into a snag in which my controller can't see any uploaded files in the request object.
I have a basic check for the file in a controller method:
public function store(Request $request)
{
if(!$request->hasFile('fileToUpload')){
app()->abort(500, 'File upload missing');
}
}
This always throws a 500. I have confirmed by looking at the headers in my browser that the file is indeed being sent to the server.
I'm wondering whether this has to do with /tmp directory permissions but my permissions look OK:
# ls -ald /tmp
drwxrwxrwt 1 root root 4096 Apr 9 23:56 /tmp
Any insight into why this is happening? It's a Laravel 10.x app running via Sail.