<% files.forEach(file => { %> <% if (fileInfoNames.includes(file.name)) { %> <% } else { %> <% } %> <% }); %>
Nom du fichier Taille Action
<%= file.name %><%= file.name %> <% if (file.type === 'folder') { %> Dossier <% } else { %> <% const fileSizeInBytes = file.size; let fileSize; if (fileSizeInBytes < 1024 * 1024) { fileSize = `${(fileSizeInBytes / 1024).toFixed(2)} Ko`; } else if (fileSizeInBytes < 1024 * 1024 * 1024) { fileSize = `${(fileSizeInBytes / (1024 * 1024)).toFixed(2)} Mo`; } else { fileSize = `${(fileSizeInBytes / (1024 * 1024 * 1024)).toFixed(2)} Go`; } %> <%= fileSize %> <% } %> <% if (file.type === 'folder') { %>
Accéder <% } else { %>
<% } %>