convert luci.fs users to nixio.fs api
[project/luci.git] / libs / cbi / luasrc / view / cbi / upload.htm
index a4ab0c9..7bde74b 100644 (file)
@@ -16,10 +16,11 @@ $Id$
 <%
        local t = require("luci.tools.webadmin")
        local v = self:cfgvalue(section)
+       v = v and nixio.fs.stat(v)
 -%>
 <%+cbi/valueheader%>
        <% if v then %>
-               <%:cbi_upload Uploaded File%> (<%=t.byte_format(luci.fs.stat(v, "size") or 0)%>)
+               <%:cbi_upload Uploaded File%> (<%=t.byte_format(v.size)%>)
                <input type="hidden"<%= attr("value", v) .. attr("name", cbid) .. attr("id", cbid) %> />
                <input class="cbi-input-image" type="image" value="<%:cbi_replace%>" name="cbi.rlf.<%=section .. "." .. self.option%>" alt="<%:cbi_replace%>" title="<%:cbi_replace%>" src="<%=resource%>/cbi/reload.gif" />
        <% else %>