Hi
I am trying to upload an image from editor form as below
{
label: "Image:",
name: "image",
type: "upload",
display: function ( id ) {
console.log(id);
return '<img src="'+ base_url +'/web/uploads/temp/'+ id +'"/>';
},
noImageText: 'No image'
}
I have confirmed that the file is getting uploaded successfully with response from server as below..
{"data":{"upload":{"id":"4872f7a766e4cb216b194bc7d185c758.png"}}}
but somehow, the console.log in display function is not happening.. that means the display function is not getting executed...
Can u please help me with this ??
Also, I want the user to be able to upload the image both while creating and updating a record ..
so is there a way to pass the record ID when uploading an image .. maybe 0 for new and ID for editng the image ??
Regards
Kaustubh