# HG changeset patch # User Kim Alvefur # Date 1449854414 -3600 # Node ID 2ce2b194d501112516609bbfb7700895da21fd07 # Parent 3b748666ff97b154d90141464331e610d524bbd7 mod_http_upload: Make file system path configurable diff -r 3b748666ff97 -r 2ce2b194d501 mod_http_upload/README.markdown --- a/mod_http_upload/README.markdown Fri Dec 11 18:00:43 2015 +0100 +++ b/mod_http_upload/README.markdown Fri Dec 11 18:20:14 2015 +0100 @@ -58,6 +58,16 @@ http_upload_file_size_limit = 10 * 1024 * 1024 -- this is 10MB in bytes ``` +Path +---- + +By default, uploaded files are put in a sub-directory of the default +Prosody storage path (usually `/var/lib/prosody`). This can be changed: + +``` {.lua} +http_upload_path = "/path/to/uploded/files" +``` + Compatibility ============= diff -r 3b748666ff97 -r 2ce2b194d501 mod_http_upload/mod_http_upload.lua --- a/mod_http_upload/mod_http_upload.lua Fri Dec 11 18:00:43 2015 +0100 +++ b/mod_http_upload/mod_http_upload.lua Fri Dec 11 18:20:14 2015 +0100 @@ -35,7 +35,7 @@ -- state local pending_slots = module:shared("upload_slots"); -local storage_path = join_path(prosody.paths.data, module.name); +local storage_path = module:get_option_string(module.name .. "_path", join_path(prosody.paths.data, module.name)); lfs.mkdir(storage_path); -- hooks