Changeset

11873:2b85e4e7d389

mod_http_file_share: Move number coercion into util.dataforms
author Kim Alvefur <zash@zash.se>
date Mon, 25 Oct 2021 21:45:06 +0200
parents 11872:ffff0d8a9c68
children 11874:84f4c6957d62
files plugins/mod_http_file_share.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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" };