mod_http_upload: Apply minor cosmetic changes

This commit is contained in:
Holger Weiss 2015-08-27 21:56:09 +02:00
parent 81e8404207
commit 06def469a4
1 changed files with 2 additions and 2 deletions

View File

@ -200,7 +200,7 @@ init({ServerHost, Opts}) ->
local), local),
MaxSize = gen_mod:get_opt(max_size, Opts, MaxSize = gen_mod:get_opt(max_size, Opts,
fun(I) when is_integer(I), I > 0 -> I; fun(I) when is_integer(I), I > 0 -> I;
(infinity) -> infinity (infinity) -> infinity
end, end,
104857600), 104857600),
SecretLength = gen_mod:get_opt(secret_length, Opts, SecretLength = gen_mod:get_opt(secret_length, Opts,
@ -480,7 +480,7 @@ create_slot(#state{service_url = undefined, max_size = MaxSize},
User, File, Size, _ContentType, Lang) when MaxSize /= infinity, User, File, Size, _ContentType, Lang) when MaxSize /= infinity,
Size > MaxSize -> Size > MaxSize ->
Text = <<"File larger than ", (jlib:integer_to_binary(MaxSize))/binary, Text = <<"File larger than ", (jlib:integer_to_binary(MaxSize))/binary,
" B.">>, " Bytes.">>,
?INFO_MSG("Rejecting file ~s from ~s (too large: ~B bytes)", ?INFO_MSG("Rejecting file ~s from ~s (too large: ~B bytes)",
[File, User, Size]), [File, User, Size]),
{error, ?ERRT_NOT_ACCEPTABLE(Lang, Text)}; {error, ?ERRT_NOT_ACCEPTABLE(Lang, Text)};