mod_http_upload: Apply minor cosmetic changes
This commit is contained in:
parent
81e8404207
commit
06def469a4
|
@ -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)};
|
||||||
|
|
Loading…
Reference in New Issue