diff --git a/include/class.forms.php b/include/class.forms.php
index a1d7a331d9a2b73889834babfba673ca4e9cc405..1aaf8715732447c23f056423c7b162a896584c6b 100644
--- a/include/class.forms.php
+++ b/include/class.forms.php
@@ -3932,7 +3932,7 @@ class FileUploadWidget extends Widget {
           allowedfiletypes: <?php echo JsonDataEncoder::encode(
             $mimetypes); ?>,
           maxfiles: <?php echo $config['max'] ?: 20; ?>,
-          maxfilesize: <?php echo $maxfilesize; ?>,
+          maxfilesize: <?php echo str_replace(',', '.', $maxfilesize); ?>,
           name: '<?php echo $name; ?>[]',
           files: <?php echo JsonDataEncoder::encode($files); ?>
         });});