How to send form data in slim framework v3 in PUT routing
<p>I am very new in slim framework and i am using slim V3 i have done post route and it works fine but when i try to update record with put method it will works with <code>Content-type = application/x-www-form-urlencoded</code> and update my record with success</p>

<p><a href="https://i.stack.imgur.com/iYGmx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iYGmx.jpg" alt="enter image description here"></a></p>

<p>when i try to send file into slim api with <code>POSTMAN Chrome Extension</code> it will not sending file with form data request.</p>

<p><a href="https://i.stack.imgur.com/M5w4O.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M5w4O.jpg" alt="enter image description here"></a></p>

<p><strong>Here is my code</strong></p>

<pre><code>$app-&gt;put('/message/{message_id}', function ($request, $response, $args)
{
    $imagePath = '';

    $data = $request-&gt;getParsedBody();

    $files = $request-&gt;getUploadedFiles();

    $file = $files['file'];
    if ($file-&gt;getError() == UPLOAD_ERR_OK ) {
        $filename = $file-&gt;getClientFilename();
        $file-&gt;moveTo('assets/images/'.$filename);
        $imagePath = 'assets/images/'.$filename;
    }

    $message = Message::find($args['message_id']);
    $message-&gt;body = $data['message'];
    $message-&gt;user_id = $data['user_id'];
    $message-&gt;image_url = $imagePath;
    $message-&gt;save();

    if ($message-&gt;id) {
        return $response-&gt;withStatus(200)-&gt;withJson([
                'message_id' =&gt; $message-&gt;id,
                'message_uri' =&gt; '/message/'.$message-&gt;id,
            ]);
    }else{
        return $response-&gt;withStatus(400)-&gt;withJson(['message'=&gt;'something went wrong!']);
    }

});
</code></pre>