I have made a form where user inputs personal information including a file.
I want that whenever user opens his profile then he/she must be able to see already attached file name in custom input field or at least if he/she doesn't choose any new picture, input file field value must be set to previously attached picture url.
This is what I tried
<div class="col-md-6 mb-3">
{% if details.picture.url != '' %}
<label for="front">Picture <span class="text-muted">
<a href='{{details.picture.url}}'>{{details.picture}}</a></span></label>
{% else %}
<label for="front">ID Card (front) <span class="text-muted">Take a snap and upload</span></label>
{% endif %}
<input type="file" class="form-control" id="front" name="front" value="{{details.picture.url}}" >
</div>
but the input field is always empty.
Kindly suggest some way around of it.