aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http_file_share.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua
index ba6b97c5..d609b781 100644
--- a/plugins/mod_http_file_share.lua
+++ b/plugins/mod_http_file_share.lua
@@ -71,7 +71,13 @@ module:hook_global("stats-update", function ()
measure_quota_cache_size(quota_cache:count());
end);
-local measure_uploads = module:measure("upload", "sizes");
+local buckets = {};
+for n = 10, 40, 2 do
+ local exp = math.floor(2 ^ n);
+ table.insert(buckets, exp);
+ if exp >= file_size_limit then break end
+end
+local measure_uploads = module:measure("upload", "sizes", {buckets = buckets});
-- Convenience wrapper for logging file sizes
local function B(bytes) return hi.format(bytes, "B", "b"); end