php - Laravel 4.2 : File in a form not working -


i have problem getting file form laravel 4.2. have form declared :

{{ form::open(array('url' => 'app/add-file', 'files' => true)) }}              {{ form::file('file')}}  <button type="submit">confirmer</button>              {{ form::close() }} 

and try show result in controller @ moment. array empty.

return var_dump(input::file()); 

when analyzed post request in chrome, see content type in headers

content-type:application/x-www-form-urlencoded; charset=utf-8

maybe problem, form declared enctype

multipart/form-data

any idea ?

thanks

i found problem. using jquery mobile , there problem. ajax must disabled form otherwise not working files. did that

{{ form::open(array('url' => 'app/add-expense', 'files' => true, 'data-ajax' => 'false')) }} 

Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -