Commit 1e1ced9a authored by Philipp Hörist's avatar Philipp Hörist

Fix detection of httpupload max-file-size

parent 20301d36
Pipeline #3797 passed with stages
in 2 minutes and 49 seconds
......@@ -83,12 +83,13 @@ class HTTPUpload(BaseModule):
self._log.info('Discovered component: %s', info.jid)
for form in info.dataforms:
form_dict = form.asDict()
if form_dict.get('FORM_TYPE') != self.httpupload_namespace:
form_type = form.vars.get('FORM_TYPE')
if (form_type is None or
form_type.value != self.httpupload_namespace):
continue
size = form_dict.get('max-file-size')
size = form.vars.get('max-file-size')
if size is not None:
self.max_file_size = int(size)
self.max_file_size = int(size.value)
break
if self.max_file_size is None:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment