After some days to trace why I get The connection was reset error on created upload form on Laravel I thought the problem is on the server and I change more options of apache2 but nothing changed.
I created simple PHP for upload file like with below implementation, that's work!!. now whats problem on my upload form on Laravel implementation which I get this error or timeout?
Please keep in the mind: I don't have any problem to upload small size files
Laravel implementation:
form:
<form action="{{route('lessons.store')}}" method="POST" enctype="multipart/form-data">
{{ csrf_field() }}
<div class="form-group">
<div class="form-group">
<div class="form-group">
<label class="display-block">please choose file</label>
<div class="media no-margin-top">
<div class="media-body">
<input type="file" class="file-styled" name="file"
value="{{old('file')}}">
</div>
</div>
</div>
<div class="text-right">
<button type="submit" class="btn btn-primary">Upload FILE
<i class="icon-arrow-left13 position-right"></i></button>
</div>
</form>
controller:
public function store(RequestContents $request)
{
ini_set('memory_limit', '256M');
$uploadedFile = $request->file('file');
dd($uploadedFile);
}
route:
Route::group(['namespace' => 'Dashboard', 'middleware' => ['auth:web'], 'prefix' => 'panel'], function () {
...
$this->resource('lessons', 'LessonsController');
...
});
public_htmlinstead of usingdisk?diskor onpublic_html