diff options
-rw-r--r-- | rebar.config | 2 | ||||
-rw-r--r-- | src/mod_http_upload.erl | 12 |
2 files changed, 4 insertions, 10 deletions
diff --git a/rebar.config b/rebar.config index 63d1b395d..790d4a11f 100644 --- a/rebar.config +++ b/rebar.config @@ -25,7 +25,7 @@ {fast_tls, ".*", {git, "https://github.com/processone/fast_tls", {tag, "1.0.22"}}}, {stringprep, ".*", {git, "https://github.com/processone/stringprep", {tag, "1.0.11"}}}, {fast_xml, ".*", {git, "https://github.com/processone/fast_xml", {tag, "1.1.30"}}}, - {xmpp, ".*", {git, "https://github.com/processone/xmpp", "cb39f8b"}}, + {xmpp, ".*", {git, "https://github.com/processone/xmpp", "7279938"}}, {fast_yaml, ".*", {git, "https://github.com/processone/fast_yaml", {tag, "1.0.14"}}}, {jiffy, ".*", {git, "https://github.com/davisp/jiffy", {tag, "0.14.8"}}}, {p1_oauth2, ".*", {git, "https://github.com/processone/p1_oauth2", {tag, "0.6.3"}}}, diff --git a/src/mod_http_upload.erl b/src/mod_http_upload.erl index 56683e8a3..ef7eaee47 100644 --- a/src/mod_http_upload.erl +++ b/src/mod_http_upload.erl @@ -689,17 +689,11 @@ iq_disco_info(Host, Lang, Name, AddInfo) -> infinity -> AddInfo; MaxSize -> - MaxSizeStr = integer_to_binary(MaxSize), XData = lists:map( fun(NS) -> - Fields = [#xdata_field{ - type = hidden, - var = <<"FORM_TYPE">>, - values = [NS]}, - #xdata_field{ - var = <<"max-file-size">>, - values = [MaxSizeStr]}], - #xdata{type = result, fields = Fields} + Fs = http_upload:encode( + [{'max-file-size', MaxSize}], NS, Lang), + #xdata{type = result, fields = Fs} end, [?NS_HTTP_UPLOAD, ?NS_HTTP_UPLOAD_0]), XData ++ AddInfo end, |