# HG changeset patch # User Kim Alvefur # Date 1635191106 -7200 # Node ID 2b85e4e7d3890196fb132aed5c7980c2eae19a22 # Parent ffff0d8a9c68168b93cc9c692b5a1126cf1db5c6 mod_http_file_share: Move number coercion into util.dataforms diff -r ffff0d8a9c68 -r 2b85e4e7d389 plugins/mod_http_file_share.lua --- a/plugins/mod_http_file_share.lua Mon Oct 25 21:43:23 2021 +0200 +++ b/plugins/mod_http_file_share.lua Mon Oct 25 21:45:06 2021 +0200 @@ -47,8 +47,8 @@ module:add_extension(dataform { { name = "FORM_TYPE", type = "hidden", value = namespace }, - { name = "max-file-size", type = "text-single" }, -}:form({ ["max-file-size"] = tostring(file_size_limit) }, "result")); + { name = "max-file-size", type = "text-single", datatype = "xs:integer" }, +}:form({ ["max-file-size"] = file_size_limit }, "result")); local upload_errors = errors.init(module.name, namespace, { access = { type = "auth"; condition = "forbidden" };