# HG changeset patch # User Kim Alvefur # Date 1485707269 -3600 # Node ID 595d6a25bd7ab07d28f907bcaa533d3db1f71a9b # Parent f48e9e25aec4b2b598cb5de0885c4183c1cc9125 mod_http_upload: Record upload slot metadata (fixes #718) diff -r f48e9e25aec4 -r 595d6a25bd7a mod_http_upload/mod_http_upload.lua --- a/mod_http_upload/mod_http_upload.lua Sun Jan 29 17:27:24 2017 +0100 +++ b/mod_http_upload/mod_http_upload.lua Sun Jan 29 17:27:49 2017 +0100 @@ -13,6 +13,7 @@ local random_hex = require"util.uuid".get_nibbles; local url = require "socket.url"; local dataform = require "util.dataforms".new; +local datamanager = require "util.datamanager"; local t_concat = table.concat; local t_insert = table.insert; local s_upper = string.upper; @@ -89,6 +90,7 @@ repeat random = random_hex(12); until lfs.mkdir(join_path(storage_path, random)) or not lfs.attributes(join_path(storage_path, random, filename)) + datamanager.list_apppend(origin.username, origin.host, module.name, { filename = join_path(storage_path, random, filename), size = filesize, time = os.time() }); pending_slots[random.."/"..filename] = origin.full_jid; local base_url = module:http_url(); local slot_url = url.parse(base_url);