data image render function

data image render function

dian_dian_ Posts: 1Questions: 0Answers: 0

Hi everyone,
I’m trying to display data image from database, it does uploads to public folder, but it won’t display.

the code.
{data: 'image',
render: function( data, type, full, meta ) {
return '<img src="/public/img" + filename.image + "" height="50"/>';
}
},

by any chance, can anyone see what I’m missing or help to correct the function?
thanks

Replies

  • kthorngrenkthorngren Posts: 20,309Questions: 26Answers: 4,770
    edited January 2023

    Its hard to say what the problem is without seeing your current solution and data. I suspect filename.image is resulting in an undefined error. Where can filename.image be found in the row data?

    If you still need help the please post a link to your page or a test case replicating the issue so we can help debug.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Maybe you need to use something like data.filename.image or just data.

    Kevin

Sign In or Register to comment.