Mercurial > prosody-hg
comparison plugins/mod_http_file_share.lua @ 11318:3b16aba6285f
mod_http_file_share: Fix name of max-file-size tag
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 27 Jan 2021 00:29:12 +0100 |
| parents | 79e1f407b6f5 |
| children | a4b299e37909 |
comparison
equal
deleted
inserted
replaced
| 11317:79e1f407b6f5 | 11318:3b16aba6285f |
|---|---|
| 45 local upload_errors = errors.init(module.name, namespace, { | 45 local upload_errors = errors.init(module.name, namespace, { |
| 46 access = { type = "auth"; condition = "forbidden" }; | 46 access = { type = "auth"; condition = "forbidden" }; |
| 47 filename = { type = "modify"; condition = "bad-request"; text = "Invalid filename" }; | 47 filename = { type = "modify"; condition = "bad-request"; text = "Invalid filename" }; |
| 48 filetype = { type = "modify"; condition = "not-acceptable"; text = "File type not allowed" }; | 48 filetype = { type = "modify"; condition = "not-acceptable"; text = "File type not allowed" }; |
| 49 filesize = { type = "modify"; condition = "not-acceptable"; text = "File too large"; | 49 filesize = { type = "modify"; condition = "not-acceptable"; text = "File too large"; |
| 50 extra = {tag = st.stanza("file-too-large", {xmlns = namespace}):tag("max-size"):text(tostring(file_size_limit)) }; | 50 extra = {tag = st.stanza("file-too-large", {xmlns = namespace}):tag("max-file-size"):text(tostring(file_size_limit)) }; |
| 51 }; | 51 }; |
| 52 }); | 52 }); |
| 53 | 53 |
| 54 function may_upload(uploader, filename, filesize, filetype) -- > boolean, error | 54 function may_upload(uploader, filename, filesize, filetype) -- > boolean, error |
| 55 local uploader_host = jid.host(uploader); | 55 local uploader_host = jid.host(uploader); |
