X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=libs%2Fcbi%2Fluasrc%2Fview%2Fcbi%2Fupload.htm;h=355f373573d351b3c1d6c2a8b59248d5529bb369;hb=f4ce1270519637a95fa2f64e236da2112d1cbe63;hp=2c293cbdd0c4059b482d7b3252fcadae0e838037;hpb=8ecff0a9cc9edb3156f8d10880aa2091bdb42c64;p=project%2Fluci.git diff --git a/libs/cbi/luasrc/view/cbi/upload.htm b/libs/cbi/luasrc/view/cbi/upload.htm index 2c293cbdd..355f37357 100644 --- a/libs/cbi/luasrc/view/cbi/upload.htm +++ b/libs/cbi/luasrc/view/cbi/upload.htm @@ -1,7 +1,7 @@ <%# LuCI - Lua Configuration Interface Copyright 2008 Steven Barth -Copyright 2008 Jo-Philipp Wich +Copyright 2008-2009 Jo-Philipp Wich Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -16,10 +16,11 @@ $Id$ <% local t = require("luci.tools.webadmin") local v = self:cfgvalue(section) + local s = 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)%>) + <% if s then %> + <%:cbi_upload Uploaded File%> (<%=t.byte_format(s.size)%>) /> " alt="<%:cbi_replace%>" title="<%:cbi_replace%>" src="<%=resource%>/cbi/reload.gif" /> <% else %>