When uploading a image, laravel goes through everything fine and dandy. No dramas. as soon as I upload a video file, nope. Pops up with:.
TokenMismatchException in VerifyCsrfToken.php line 46:
I have a valdiator:
$fileVali = \Validator::make(
['file' => \Input::file('media')],
['file' => 'required|image']
);
here is the blade form:
{!! Form::open(array('method' => 'post', 'url' => '/post', 'class' => 'uk-form uk-width-1-1', 'files' => true)) !!}
{!! Form::text('post', NULL , array('class' => 'uk-form-blank uk-form-large', 'placeholder' => 'Whats Up ' . Session::get('user') . '?')) !!}
{!! Form::file('media' , '', array('enctype' => 'multipart/form-data')) !!}
{!! Form::close() !!}
Update: I have found that the issue is popping up because I'm uploading quite a large video file (65mb). Laravel had a issue with file size before but didn't pop back with validation errors!!anyone know what is going on?
Update 2: The Return Of The Update
Ok, so my route:
Route::post('/post', 'FeedController@create');
According to your update, you said, "Laravel had a issue with file size"
.
If that the case, I don't think is Laravel. It's your PHP configuration.
Have you update these directives in your php.ini file to fit your need.
upload_max_filesize = 100M
post_max_size = 100M
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With