No POST when uploading file

Hey, I have a problem.

I have a form with enctype="multipart/form-data", and when I don’t choose any file in input[type="file"] everything is ok (POST data is in $request->getParsedBody()), but when I choose file, $request->getParsedBody() is an empty array ($request->getParams() too). What am I doing wrong?

If it’s needed, here’s the code: and view:


That encoding type is not supported by default with Slim.

The supported encoding types are defined here.

You can add a new one for support or you can parse the body yourself by using $request->getBody() which will get the raw body stream from the request object.