Software /
code /
prosody-modules
Changeset
2489:9d154c929319
mod_http_upload: Log the directory and filename joined
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 10 Feb 2017 11:04:16 +0100 |
parents | 2488:590ac12b7671 |
children | 2490:85509650ba82 |
files | mod_http_upload/mod_http_upload.lua |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_http_upload/mod_http_upload.lua Thu Feb 09 10:47:24 2017 +0100 +++ b/mod_http_upload/mod_http_upload.lua Fri Feb 10 11:04:16 2017 +0100 @@ -91,7 +91,8 @@ until lfs.mkdir(join_path(storage_path, random)) or not lfs.attributes(join_path(storage_path, random, filename)) datamanager.list_append(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 slot = random.."/"..filename; + pending_slots[slot] = origin.full_jid; local base_url = module:http_url(); local slot_url = url.parse(base_url); slot_url.path = url.parse_path(slot_url.path or "/"); @@ -103,7 +104,7 @@ reply:tag("get"):text(slot_url):up(); reply:tag("put"):text(slot_url):up(); origin.send(reply); - origin.log("debug", "Given upload slot %q", random); + origin.log("debug", "Given upload slot %q", slot); return true; end);