上传视频时出现TokenMismatchException? [英] TokenMismatchException when uploading a Video?

查看:110
本文介绍了上传视频时出现TokenMismatchException?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

上传图像时,laravel会经历所有繁琐的工作.没戏 我上载视频文件后,就可以了.弹出:.

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:.

VerifyCsrfToken.php第46行中的

TokenMismatchException:

TokenMismatchException in VerifyCsrfToken.php line 46:

我有一个检定员:

$fileVali = \Validator::make(

    ['file' => \Input::file('media')],
    ['file' => 'required|image']

            );

这是刀片形式:

{!! 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() !!}

更新: 我发现此问题突然出现,因为我正在上传相当大的视频文件(65mb). Laravel之前有文件大小问题,但是没有弹出验证错误!有人知道怎么回事吗?

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?

更新2:更新的返回

好,所以我的路线:

Route::post('/post', 'FeedController@create');

推荐答案

根据您的更新,您说"Laravel had a issue with file size".

如果是这样的话,我认为不是Laravel.这是您的PHP配置.

If that the case, I don't think is Laravel. It's your PHP configuration.

是否已根据您的需要在 php.ini 文件中更新了这些指令.

Have you update these directives in your php.ini file to fit your need.

upload_max_filesize = 100M
post_max_size = 100M

这篇关于上传视频时出现TokenMismatchException?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆