0
Ultimamento I’ve been fiddling with uploads of files, view them with PHP and etc... and came to me a question the head, I searched but I did not find something right.
How close I can get to making a preview of files or even play with the css on it, putting an image and the file name?
But depending on the extent of it, if the extension is
DOCXdisplays a word icon and underneath the file name, etc....
Is there a library for this or some script?
The preview that I would like is this (gmail): obviously can be others too...

I’m already displaying my files normally, just want to put one
previewin the display of each file...
How I display:
<?php
require('conexaobd.php');
$sql = "SELECT relatorio.*, pacientes.nome, pacientes.data_saida FROM relatorio,pacientes WHERE relatorio.paciente=pacientes.nome";
$resultado = mysqli_query($link, $sql);
$inc = 0;
while ($cont = mysqli_fetch_array($resultado)) {
echo '
<tr>
echo $cont['relatorio_educacao_fisica'] != "" ? "<td><a href='ver-arquivo.php?documento=uploads/uploadsed/{$cont['relatorio_educacao_fisica']}' title='{$cont['relatorio_educacao_fisica']}' target='_blank'><img src='images/icon/bola.png' style='width:40px; height:40px;cursor:pointer;'></a></td>" : "<td></td>";
echo $cont['relatorio_enfermagem'] != "" ? "<td><a href='ver-arquivo.php?documento=uploads/uploadsenf/{$cont['relatorio_enfermagem']}' title='{$cont['relatorio_enfermagem']}' target='_blank'><img src='images/icon/enf.png' style='width:40px; height:40px;cursor:pointer;'></a></td>" : "<td></td>";
';
?>
can only be done with CSS, but include your code in the question
– hugocsl
Ready @hugocsl
– Samuel Verissimo