aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-01-27 17:48:12 +0100
committerKim Alvefur <zash@zash.se>2021-01-27 17:48:12 +0100
commit7ab22af561a28df448ef437c3e277bc159eed5ca (patch)
treee30d82abf60176694c9b86e741e83c9c1c90d1fc /plugins
parent77e9e9eaa6da66591fe7b8e4da9378ead6439629 (diff)
downloadprosody-7ab22af561a28df448ef437c3e277bc159eed5ca.tar.gz
prosody-7ab22af561a28df448ef437c3e277bc159eed5ca.zip
mod_http_file_share: Use '.bin' file extension
Distinct from '.dat' used by datamanager / internal stortage for Lua object storage so that they can't easily be loaded by accident that way.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_http_file_share.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mod_http_file_share.lua b/plugins/mod_http_file_share.lua
index 25efdaa8..55af15a1 100644
--- a/plugins/mod_http_file_share.lua
+++ b/plugins/mod_http_file_share.lua
@@ -171,7 +171,8 @@ function handle_upload(event, path) -- PUT /upload/:slot
-- so we also check the final file size on completion.
end
- local filename = dm.getpath(upload_info.slot, module.host, module.name, nil, true);
+ local filename = dm.getpath(upload_info.slot, module.host, module.name, "bin", true);
+
if not request.body_sink then
module:log("debug", "Preparing to receive upload into %q, expecting %s", filename, B(upload_info.filesize));
@@ -228,7 +229,7 @@ function handle_download(event, path) -- GET /uploads/:slot+filename
if request.headers.if_modified_since == last_modified then
return 304;
end
- local filename = dm.getpath(slot_id, module.host, module.name);
+ local filename = dm.getpath(slot_id, module.host, module.name, "bin");
local handle, ferr = errors.coerce(io.open(filename));
if not handle then
return ferr or 410;