Support the ongoing development of Laravel.io →
posted 10 years ago
Input
Last updated 2 years ago.
0

check if your image is not to big (file size) to upload (php.ini -> upload_max_filesize, post_max_size)

Last updated 2 years ago.
0

In addition to what @zenry suggested, you can also check if a file is available / uploaded:

if (Input::hasFile('image'))
{
    //
}
Last updated 2 years ago.
0

zenry said:

check if your image is not to big (file size) to upload (php.ini -> upload_max_filesize, post_max_size)

Thanks you, i try upload file 100kb but i have this error

Last updated 2 years ago.
0

usm4n said:

In addition to what @zenry suggested, you can also check if a file is available / uploaded:

if (Input::hasFile('image'))
{
   //
}

Thanks, but images variable, i do var_dump($img) and it show many value , name,size ,.... i user $img->getClientOriginalName(), it still error Call to a member function getClientOriginalName() on a non-object.Summary, i don't use these function

Last updated 2 years ago.
0

try on your View set ** 'files' => true** e.g.

{{  Form::open(array('url' => 'app/save', 'files' => true)) }}
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.