summaryrefslogtreecommitdiff
path: root/src/mod_http_upload.erl
diff options
context:
space:
mode:
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>2018-05-17 12:00:06 +0300
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>2018-05-17 12:00:06 +0300
commitb64e1d95d2258a6ac40aa6352991ac1d5482c789 (patch)
tree0f23acc92811824d40d921d3bf3d7c7a3ecde1c2 /src/mod_http_upload.erl
parentClean state between requests in ejabberd_http (diff)
Fix typo file:read() -> file:open()
Diffstat (limited to 'src/mod_http_upload.erl')
-rw-r--r--src/mod_http_upload.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mod_http_upload.erl b/src/mod_http_upload.erl
index 1f92672f..34138240 100644
--- a/src/mod_http_upload.erl
+++ b/src/mod_http_upload.erl
@@ -414,7 +414,7 @@ process(_LocalPath, #request{method = Method, host = Host, ip = IP} = Request)
case catch gen_server:call(Proc, get_conf) of
{ok, DocRoot, CustomHeaders} ->
Path = str:join([DocRoot | Slot], <<$/>>),
- case file:read(Path, [read]) of
+ case file:open(Path, [read]) of
{ok, Fd} ->
file:close(Fd),
?INFO_MSG("Serving ~s to ~s", [Path, ?ADDR_TO_STR(IP)]),