comparison mod_http_upload/mod_http_upload.lua @ 1967:2ce2b194d501

mod_http_upload: Make file system path configurable
author Kim Alvefur <zash@zash.se>
date Fri, 11 Dec 2015 18:20:14 +0100
parents 3b748666ff97
children 40056a27f394
comparison
equal deleted inserted replaced
1966:3b748666ff97 1967:2ce2b194d501
33 module:add_feature(xmlns_http_upload); 33 module:add_feature(xmlns_http_upload);
34 34
35 -- state 35 -- state
36 local pending_slots = module:shared("upload_slots"); 36 local pending_slots = module:shared("upload_slots");
37 37
38 local storage_path = join_path(prosody.paths.data, module.name); 38 local storage_path = module:get_option_string(module.name .. "_path", join_path(prosody.paths.data, module.name));
39 lfs.mkdir(storage_path); 39 lfs.mkdir(storage_path);
40 40
41 -- hooks 41 -- hooks
42 module:hook("iq/host/"..xmlns_http_upload..":request", function (event) 42 module:hook("iq/host/"..xmlns_http_upload..":request", function (event)
43 local stanza, origin = event.stanza, event.origin; 43 local stanza, origin = event.stanza, event.origin;