通过表单HTML上传文件到CMS十月的问题



html:中的代码

<div class="form-group">
<label>file input</label>
<input type="file" name="inFile" class="form-control-file" accept=".jpg, .jpeg, .png" multiple></div>

在联系人中来自:

$infri->files   = Input::file('inFile');

在模型中:

public $attachMany = [
'files' => 'SystemModelsFile'
];

并且该文件在CMS系统中不存在。

HTML代码:

<form method="post" data-request="contactfrom::onSend" enctype="multipart/form-data" data-request-validate>
<div class="form-group">
<label>Your name</label>
<input type="name" name="name" id="yourName" class="form-control" placeholder="Full Name" required>
</div>

<div class="form-group">
<label>Email address</label>
<input type="email" name="email" class="form-control" aria-describedby="emailHelp" placeholder="name@example.com" required>
</div>
<div class="form-group">
<input type="checkbox"  id="hidden1" name="hidden1">
<label> Hide - name and your email</label><br>
</div>
<div class="form-group">
<label>Phone number</label>
<input type="tel" class="form-control" name="phone" pattern="[0-9]{10}"  required>
</div>


<div class="form-group">
<label>Copyright Infringement URL</label>
<input type="url" name="url" class="form-control" placeholder="www.example.com" required>
</div>
<div class="form-group">
<label>Your message</label>
<textarea name="message" class="form-control" rows="3" placeholder="say something..."></textarea>
</div>
<div class="form-group">
<label>file input</label>
<input type="file" name="inFile" id="inFile" class="form-control-file" accept=".jpg, .jpeg, .png" multiple>
</div>
<input type="hidden" name="recaptcha_response" id="recaptchaResponse">
<button align="right" type="sumbit"  name="post" class="btn btn-success" value="Post" style="float: right"; >send</button>
<br>
<ul>
{% for error in errors.all() %}
<strong><li>{{ error }}</li></strong>

{% endfor %}
</ul>

</form>