I am using Dropzone js to upload (images, application/pdf,videos/mp4 )to my application. This works fine on the insert page but I need to be able to edit records and add or change already existing images display fine but pdf and video not display associated with the record. The overall application is using Laravel enter image description here
init: function (file, response) {
myDropzone = this; // closure
$.ajax({
url:finalUrl,
type: "GET",
dataType: "json",
success: function(response) { // get result
var abc=response.data;
// console.log(abc);
$.each(abc, function(key,value) {
// console.log(value.avatarFullUrl);
var mockFile = { name: value.documentUrl,accepted: true};
var pth=value.avatarFullUrl;
myDropzone.emit("addedfile", mockFile);
myDropzone.emit("thumbnail", mockFile, pth);
myDropzone.emit("complete", mockFile);
});
}
});
enter code here
enter code here