Mercurial > prosody-modules
comparison mod_http_upload/mod_http_upload.lua @ 2477:c32ca5ad2539
mod_http_upload: Fix typo
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Sun, 29 Jan 2017 19:18:49 +0100 |
| parents | 024a4143baef |
| children | 1fae2a0a4092 |
comparison
equal
deleted
inserted
replaced
| 2476:024a4143baef | 2477:c32ca5ad2539 |
|---|---|
| 88 | 88 |
| 89 local random; | 89 local random; |
| 90 repeat random = random_hex(12); | 90 repeat random = random_hex(12); |
| 91 until lfs.mkdir(join_path(storage_path, random)) or not lfs.attributes(join_path(storage_path, random, filename)) | 91 until lfs.mkdir(join_path(storage_path, random)) or not lfs.attributes(join_path(storage_path, random, filename)) |
| 92 | 92 |
| 93 datamanager.list_apppend(origin.username, origin.host, module.name, { filename = join_path(storage_path, random, filename), size = filesize, time = os.time() }); | 93 datamanager.list_append(origin.username, origin.host, module.name, { filename = join_path(storage_path, random, filename), size = filesize, time = os.time() }); |
| 94 pending_slots[random.."/"..filename] = origin.full_jid; | 94 pending_slots[random.."/"..filename] = origin.full_jid; |
| 95 local base_url = module:http_url(); | 95 local base_url = module:http_url(); |
| 96 local slot_url = url.parse(base_url); | 96 local slot_url = url.parse(base_url); |
| 97 slot_url.path = url.parse_path(slot_url.path or "/"); | 97 slot_url.path = url.parse_path(slot_url.path or "/"); |
| 98 t_insert(slot_url.path, random); | 98 t_insert(slot_url.path, random); |
