I am currently utilizing ng-file-upload
to upload images with Angular.js. The issue I'm encountering is that when a user selects a file for the second time in the same field, the name of the previously chosen image doesn't display.
Below is my code:
<input type="file" class="filestyle form-control" data-size="lg" name="upload_{{$index}}" id="bannerimage_{{$index}}" ng-model="mul.image" ngf-pattern="'image/*'" accept="image/*" ngf-max-size="2MB" ngf-select="onFileSelect1($index);">
For instance, if a user selects an image let's say abc.png
for the first time and then clicks on the same input field again, the first image abc.png
disappears before the user selects a new image. Additionally, if the user cancels the file dialog box, the previous image name also does not remain visible in the file field, which is not the desired behavior.
My goal here is to have the previous image name displayed in the file field until a second image is selected by the user in the same field.