Hi Abu, on your demo file_upload.php if I upload an image it displays in note field no problem. If however I upload PDF, DOC or xls for example it shows a broken image icon, is there a way for it to display the icons of these file types please?
4 Answers
Here you will need on_data_display calback function, which will check the file extension and display custom image.
e.g. with image display column:
$col["on_data_display"] = array("display_icon","");
function display_icon($data)
{
$kw = $data["image_field"];
// if $kw ext is doc
// return "doc.jpg";
// else
// return $kw;
}
Thanks Abu, is this in the demo file so I can investigate full code, it wont load on your sites demo, says email you?
Thanks
Your Answer