Raimondas's avatar

Unable to guess the mime type as no guessers are available

So I'm getting this when I want to submit my form:

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

I have enabled in php.ini - php_fileinfo extension. I also restarted my localhost server.

This is my rule: 'img_1' => 'required|mimes:png,gif,jpeg',

This is what I get when I submit form:

at MimeTypeGuesser->guess('C:\xampp\tmp\php2490.tmp') in File.php line 79

This is how I uploading image:


    public function storeAuction(AuctionSubmitRequest $request)
    {   
        $product = Product::create($request->all());

    if(Input::hasfile('img_1'))
    {
    $request->file('img_1')->move(public_path('images'), $request->file('img_1')->getClientOriginalName());

    $product->img_1 = 'images' . $request->file('img_1')->getClientOriginalName();
    }

        $product->user_id = Auth::user()->id;
        $product->save();
        return redirect('/');

    }
0 likes
1 reply

Please or to participate in this conversation.