php - Laravel 4.2 big file upload -
i'm using laravel 4.2 , have problems uploading big files. if upload small files working good.
i changed php.ini , stop/start wamp server.
post_max_size = 128m
upload_max_filesize = 64m
on html file:
<form role="form" method="post" action="{{ url::route('post-admin-cat-princ') }}" enctype="multipart/form-data"> <div class="form-group"> <label for="picture1">catalogue</label> <input id="picture1" name="picture1" type="file" multiple class="form-control" /> @if($errors->has('picture1')) {{ $errors->first('picture1') }} @endif </div> <input class="btn btn-success" type="submit" value="add catalogue" /> </form>
on routes:
route::post('/catalogprinc', array('uses' => 'admincontroller@postcatprin', 'as' => 'post-admin-cat-princ'));
on controller:
public function postcatprin() { if(input::hasfile('picture1')) { save it; return redirect::route('get-catalog')->with('success', 'catalogue added!'); } return redirect::route('get-catalog')->with('fail', 'there no catalogue!'); }
the problem if file not big (image) it's working fine. if try add pdf file (12mb) fails , return 'error' there no catalogue!
i have no idea wrong.
thanks you!
edit: not using csrf
.
in php settings, make sure:
post_max_size=128m upload_max_filesize=128m memory_limit=128m
it doesn't have 128m
make sure @ least big file want upload.
Comments
Post a Comment