'How to solve after upload the image missing in html
I am doing an image upload. The image successfully uploads but when press the button the image will missing. This is my interface for image upload
when I select the image the default image will change to the image I select
ut after I press the upload button to the backend it works but the selected image will become back the default one. Does anyone know how to solve it? Thanks in advance
Here is my code:
<form method="POST" action="url" enctype="multipart/form-data" id="upload">
@csrf
<div class="d-flex mb-2 ms-1 justify-content-md-center">
<img src="{{ asset('assets/images/placeholder.png') }}"/>
</div>
<label class="btn me-75 mb-0" for="picture">
<span class="d-none d-sm-block">Upload</span>
<input class="form-control" type="file" name="image" id="change" accept="image/*" hidden required/>
</label>
</form>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


