I'm trying to fetch the data from MySQL database and one of the field type is BLOB (image) and trying to put this value inside an input type = "file". I successfully managed to put the other values inside input type = "text" but not in type = file. Btw, these are inside Bootstrap Modal.
Is there a way to pass this blob type inside using Jquery?
//open Edit Modal
$(".toggleEditModal").on("click", function(e) {
e.preventDefault();
$("#c_id").val($(this).data("id"));
$("#c_name").val($(this).data("name"));
$("#c_logo").val($(this).data("logo"));
$("#editModal").modal("show");
});
<a href="#" class="btn btn-info toggleEditModal" data-id="<?php echo $rid; ?>" data-name="<?php echo company_name; ?>" data-logo="<?php echo $logo; ?>">Edit</a>
<div class="modal-body">
<input type="text" id="c_id" class="form-control" />
<input type="text" id="c_name" class="form-control" />
<input type="file" id="c_logo" class="form-control" />
</div>
This is the sample output what I want to happen when I open the Edit Modal, I want the filename to appear in input type = "file".
</div>