Enable the php_fileinfo extension?

Phan Thành

I am trying to post images in the image file format. My Code:

public function store ()
{
    $data = request()->validate ([
        'caption' => 'required',
        'image' => 'required | image | mimes: jpeg, png, jpg, gif, svg | max: 2048'
    ]);

    dd (request()->all());
}

But an error appears:

Unable to guess the mime type as no guessers are available (Did you enable the php_fileinfo extension?).

I learned on StackOverflow enable file info. Meanwhile, I made sure to turn it on and reset it. My PHP version is 7.4 XAMPP 3.2.4.

Thank you, everyone!

Phan Thành

I installed xampp which is not suitable for the php version so it failed to install the php_file extension. You just need:

B1: Uninstall current xampp.
B2: Reinstall xampp to match the PHP version.
B3: Turn on the appropriate utilities.

Hope this answer is of help to you!

enter image description here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Laravel file download - php_fileinfo extension not enabled

Enable fileinfo extension

How can I install extension php_fileinfo in my php.ini in Windows 10

Unable to guess the MIME type as no guessers are available. How do I install php_fileinfo extension in cPanel?

How to enable sockets extension in php-fpm?

Wamp and Php extension one click enable

Enable PHP Extension (php_odbc.dll) on Azure

How do I install / enable the PHP phar extension?

How to enable php-Mcrypt extension in Laravel Homestead

Laradock: how to enable/install php7 ldap support extension?

How can I enable the MySQLi extension in PHP 7?

How to enable solr spellchecker or suggester in the PHP PECL extension

PHP : enable Ioncube loader extension in GAE standard environment

Can not enable ionCube extension

Network Extension entitlement, how to enable it?

Enable Chrome extension for certain urls?

Enable a VSIX extension in a certain language?

Selenium start chrome and enable extension

The requested PHP extension ext-iconv * is missing from your system. Install or enable PHP's iconv extension

PHP Fileinfo extension must be installed/enabled to use Intervention Image

How to install and enable php extension for tidy html on a beanstalk with amazon linux 2? (php ver. 7.4)

The following extensions are missing! Please enable the PHP extension(s) in php.ini

install and enable OCI8 extension for php:8.1-fpm in Dockerfile

How to enable Svelte Google Chrome Dev extension

How to auto-enable Chrome extension?

How to enable FinderSync Extension in macOS System Preferences

How to enable SQL authentication using SqlIaasExtension extension

Enable soft wrap filtered by extension in Atom Editor

How to dynamically enable/disable Responsive extension