0

I tried to validate avif file like I validate png or jpeg, with mimes rule, but Laravel determines file mime type as application/octet-stream and rejects it.

$request->validate([
    'file' => 'required|file|mimes:avif'
]);

How do I validate .avif image type?

trckster
  • 430
  • 1
  • 6
  • 11
  • is the mime type declared on your server ? https://shortpixel.com/blog/avif-mime-type-delivery-apache-nginx/ – N69S May 05 '22 at 08:54
  • The problem lies in PHP Fileinfo extension and appears not only on server, but locally – trckster May 05 '22 at 09:08

0 Answers0