title: Adonis.js validate request.multipart.file image size & extension
body: <p>I am trying to validate size and extension from images present in the request as multipart/form-data.</p>
  
  <p>What i tried but didnt worked:</p>
  
  <pre><code>const validationOptions = {
      types: ['image'],
      size: '2mb',
      extnames: ['png', 'jpg', 'jpeg']
  }
  
  await request.multipart.file('front_img', validationOptions, async (file) =&gt; {
      const file_content = await getStream.buffer(file.stream);
      request.front_img_b64 = Buffer.from(file_content).toString('base64');
  });
  </code></pre>
  
  <p>request.multipart.file seems to have a "options" array where i passed the validationsOptions object but does not have any effect.</p>
  
  <p>How i can validate images size and extension in my middleware ? </p>
  
  <p>Thank you.</p>