# HG changeset patch # User Kim Alvefur # Date 1611766092 -3600 # Node ID 494761f5d7da8c7e2a139c279f292c57b3cef47f # Parent a853a018eede6ae841b506f82484f0570a608e2a 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. diff -r a853a018eede -r 494761f5d7da plugins/mod_http_file_share.lua --- a/plugins/mod_http_file_share.lua Wed Jan 27 17:47:04 2021 +0100 +++ b/plugins/mod_http_file_share.lua Wed Jan 27 17:48:12 2021 +0100 @@ -171,7 +171,8 @@ -- 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 @@ 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;