Are you sure you've updated the right php.ini?
Uploading a video file above 2MB throws TokenMismatch Exception on Laravel 5.3.22
Hi everyone, I have been trying to upload a video through a form on my Laravel application but it has been difficult.
I have csrf token on my form and still when I try to upload a video above 2MB the form throws up tokenMismatch Exception.
When I try to upload either an image file or a video file less than 2MB it works fine. But immediately I try to upload a video file more than that, it throws up the Exception.
I have increased my post_max_size and upload_max_filesize in php.ini to a value far above that, restarted my machine/web server severally and still experience the same issues.
I am working with Laravel 5.3.22 on a MAC OS with PHP 7 on XAMPP
Below is some part of my file upload form and processing controller
//Form opening tag
{{Form::open(['url'=>'/admin/lesson','class'=>'form-horizontal ','method'=>'POST','enctype'=>'multipart/form-data'])}}
and the line for the file
<div class="form-group{{ $errors->has('lesson_file') ? ' has-error' : '' }}">
<label for="lesson-file" class="col-md-4 control-label">Lesson File</label>
<div class="col-md-6">
{{Form::file('lesson_file',['class'=>'form-control','id'=>'lesson-file'])}}
@if ($errors->has('lesson_file'))
<span class="help-block">
<strong>{{ $errors->first('lesson_file') }}</strong>
</span>
@endif
</div>
</div>
I'll appreciate any guide to solve this.
Thank you.
Please or to participate in this conversation.