Diff

plugins/mod_http_file_share.lua @ 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
parent 11865:77bbbd4263d7
child 11990:6f4790b8deec
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" };