I have a case when I choose file to upload and then I click submit if a validation happens it will be refreshed the page, right? what I want is the file that I have chosen not getting removed after refreshed
this is my form.blade:
<div class="form-group mb-2">
<label for="img_thumbnail" class="col-form-label required">Image thumbnail <span class="text-danger">*</span></label>
<input type="file" class="form-control persistent-file-input" name="img_thumbnail" id="img_thumbnail" placeholder="Image Thumbnail" value="{{ isset($module) ? $module?->img_thumbnail : old('img_thumbnail') ?? '' }}" @if(empty($module->img_thumbnail)) required @endif>
<small class="text-info">Size: 320 x 192 (jpg, png)</small>
@if (isset($module) && $module->image_url)
<img src="{{ $module->image_url }}" class="img-thumbnail mt-1" style="height:auto; width: 100px">
@endif
<small class="err-message text-danger err-img_thumbnail">{{ $errors->first('img_thumbnail') }}</small>
</div>
<div class="form-group mb-3">
<label for="document_pi" class="col-form-label required">Document Pi: <span class="text-danger">*</span></label>
<input type="file" class="form-control persistent-file-input" name="document_pi" id="document_pi" placeholder="Module document_pi" value="{{ isset($module) ? $module?->document_pi : old('document_pi') ?? '' }}" @if(empty($module->document_pi)) required @endif>
<small class="text-info">Max 10MB for PPT or PDF</small>
@if (isset($module) && $module?->document_url)
<a target="_blank" href="{{ $module->document_url }}">
<i class="fa fa-file" aria-hidden="true"></i>
{{$module?->document_pi }}
</a>
@endif
<small class="err-message text-danger err-document_pi">{{ $errors->first('document_pi') }}</small>
</div>