I am using Uploadcare on my site and I am loving it.
I have one problem though I am using a bootstrap modal which I load the data through AJAX. I want Uploadcare widget to recognise that the file already exists and show the picture (not ask to upload new). Is there a way to force the widget to refresh and read the value=""
. If I set the value before it works as intended.
My code is below: data[4] returns the URL of the Uploadcare image
<input type="hidden"
id="editurl"
name="url"
role="uploadcare-uploader"
data-crop=""
data-images-only="true">
$.ajax({
type: "POST",
dataType: "json",
url: "worker.php",
data: "action=details&id="+ id +"",
error: function() {
show_notification("danger", "warning-sign", "Ajax query failed!");
},
success: function(data) {
$("#editurl").val(data[4]);
}
});