How do I limit the uploaded file size. I have tried the following validator but it has not helped. It uploads files of all sizes:
...
//Validator
$inputFilter->add([
'name' => 'my-file',
'required' => true,
'validators' => [
[
'name' => MimeType::class,
'options' => [
'mimeType' => ['application/vnd.openxmlformats-officedocument.wordprocessingml.document','application/pdf','application/octet-stream'],
],
],
[
'name' => Size::class,
'options' => [
[
'min' => '10kB',
'max' => '40kB',
]
],
],
],
]);
…
What is the appropriate way to use the Size validator?
Thanks!