<% local data, viewlibrary, page_info, session = ... htmlviewfunctions = require("htmlviewfunctions") html = require("acf.html") %> <% function convertsize(size) if string.find(size, "k$") then return tonumber(string.match(size, "[%d.]*")) * 1024.0 elseif string.find(size, "M$") then return tonumber(string.match(size, "[%d.]*")) * 1024.0 * 1024.0 elseif string.find(size, "G$") then return tonumber(string.match(size, "[%d.]*")) + 1024.0 * 1024.0 * 1024.0 else return tonumber(string.match(size, "[%d.]*")) end end %> <% htmlviewfunctions.displaycommandresults({"expert"}, session) %> <% if viewlibrary and viewlibrary.dispatch_component then viewlibrary.dispatch_component("status") end %>

<%= html.html_escape(data.label) %>

<% for i,file in ipairs(data.value) do %> <% end %>
File Size Last Modified
<%= html.link{value = "expert?filename=" .. file.filename.."&redir="..page_info.orig_action, label=file.filename} %> <%= convertsize(file.filesize) %>b<%= html.html_escape(file.filesize) %> <%= html.html_escape(file.mtime) %>