aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_http_file_share.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_http_file_share.lua')
-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 74c97a1b..60b26ff3 100644
--- a/plugins/mod_http_file_share.lua
+++ b/plugins/mod_http_file_share.lua
@@ -245,9 +245,10 @@ function handle_upload(event, path) -- PUT /upload/:slot
if not request.body_sink then
module:log("debug", "Preparing to receive upload into %q, expecting %s", filename, B(upload_info.filesize));
- local fh, err = errors.coerce(io.open(filename.."~", "w"));
+ local fh, err = io.open(filename.."~", "w");
if not fh then
- return err;
+ module:log("error", "Could not open file for writing: %s", err);
+ return 500;
end
request.body_sink = fh;
if request.body == false then