php - File input returning null value in Laravel 4.2 -


i have file input element on laravel , returning null value. have tried var_dump , dd() see values returned on form post , returns null. have read similar questions , tried apply several of suggested solutions problem yet have had no luck finding solution.

i have checked max upload size wamp server , file size of images trying upload in kilobytes , no close 1mb.

what doing wrong?

this view

  <div class="container">       <a href=""> edit page </a>         {{ form::open( array('route' => 'postsitetest', 'files' => true)) }}          {{form::file('testlink')}}         {{ form::token() }}         <input type="submit" value="save changes" class="btn btn-primary   btn-lg">       {{ form::close() }}   </div> 

and controller

public function postsitetest() {     $file = input::file('testlink');     var_dump($file);      $test = new facilitiespg();     $file1 = input::file('testlink');     $filename1 = $file1->getclientoriginalname();      $test->libimglink = $filename1;     if($test->save())     {         return 'img name saved';     } } 

after spending many hours trying fix error, discovered problem value of "post_max_size" property in php.ini file. uploading files exceeded amount specified in php.ini file during file post. increasing "post_max_size" solved problem. hope helps somebody.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -