i use laravel 53 and try to use http://plugins.krajee.com/ as file input. The problem is: no file upload will be done. This is the relevant part of my blade code:
<form class="form-horizontal" role="form" id="myuseredit" method="POST" action="{{ url('upload') }}" >
...
<div class="col-md-10 ">
<input id="filedata" name="filedata[]" type="file" multiple class="file-loading">
<script>
$("#filedata").fileinput({
uploadAsync: true,
maxFileCount: 5
});
</script>
</div>
</form>
...
And this is the corrosponding controller code:
public function upload(Request $request) {
dd($request->all());
...
The request shows me only the Name of the original file, what i picked to upload. But nothing more, no upload, no files (on server).
bfo
If you want to upload files, you have to add
enctype="multipart/form-data"
to your form tag so the browser knows you want to upload files.Like so: