所以我试图在我用laravel创建的应用程序上传视频,现在当我尝试上传图片时工作正常,但是当我尝试上传视频时,它只返回' null'我试过更改upload_max_filesize = 10M post_max_size = 10M memory_limit = 32M
更高的数字,如200M,但我仍然无效,我试图在互联网上寻找答案,但有很多人与我有同样的问题。这就是我在我的控制器和我的观点中所拥有的
{{Form::open(array('url' => 'Newpost', 'files' => 'true', 'method' => 'post'))}}
{{Form::label('title', '*Title')}}
{{Form::text('title', null,array(
'class' => 'form-control',
'placeholder' => 'Title...',),
['data-ng-model' => 'title']
)}}<br>
{{Form::label('content', '*Content')}}
{{Form::textarea('content',null ,array(
'class' => 'form-control',
'placeholder' => 'Write here...'
))}}
<br>
{{Form::file('image',array(
'class' => 'btn btn-primary'
))}}<p class="p">You are only allowed to submit one file photo*</p><br>
{{Form::file('vid',array(
'class' => 'btn btn-info'
))}}<br>
{{Form::submit('Publish', array(
'class' => 'btn btn-default'
))}}
{{Form::close()}}
控制器
$input = Input::all();
dd($input);
我也试过
Input::file('vid');
但仍然会返回错误。
答案 0 :(得分:0)
你必须提出你的帖子架构:
$表 - &GT;字符串(&#39; VID&#39;) - &GT;可为空的();