Better handling of max file upload size according to PHP settings
- Allow unlimited size - Better parsing of PHP size Fixes #4896
This commit is contained in:
committed by
Frédéric Guillot
parent
6e84f41517
commit
b138a99ce3
@@ -9,7 +9,7 @@
|
||||
'labelDropzone' => t('Drag and drop your files here'),
|
||||
'labelOr' => t('or'),
|
||||
'labelChooseFiles' => t('choose files'),
|
||||
'labelOversize' => t('The maximum allowed file size is %sB.', $this->text->bytes($max_size)),
|
||||
'labelOversize' => $max_size > 0 ? t('The maximum allowed file size is %sB.', $this->text->bytes($max_size)) : null,
|
||||
'labelSuccess' => t('All files have been uploaded successfully.'),
|
||||
'labelCloseSuccess' => t('Close this window'),
|
||||
'labelUploadError' => t('Unable to upload this file.'),
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
'labelDropzone' => t('Drag and drop your files here'),
|
||||
'labelOr' => t('or'),
|
||||
'labelChooseFiles' => t('choose files'),
|
||||
'labelOversize' => t('The maximum allowed file size is %sB.', $this->text->bytes($max_size)),
|
||||
'labelOversize' => $max_size > 0 ? t('The maximum allowed file size is %sB.', $this->text->bytes($max_size)) : null,
|
||||
'labelSuccess' => t('All files have been uploaded successfully.'),
|
||||
'labelCloseSuccess' => t('Close this window'),
|
||||
'labelUploadError' => t('Unable to upload this file.'),
|
||||
|
||||
@@ -13,7 +13,9 @@
|
||||
<?= $this->form->label(t('CSV File'), 'file') ?>
|
||||
<?= $this->form->file('file', $errors) ?>
|
||||
|
||||
<?php if ($max_size > 0): ?>
|
||||
<p class="form-help"><?= t('Maximum size: ') ?><?= is_integer($max_size) ? $this->text->bytes($max_size) : $max_size ?></p>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->modal->submitButtons(array('submitLabel' => t('Import'))) ?>
|
||||
</form>
|
||||
|
||||
@@ -30,7 +30,9 @@
|
||||
<?= $this->form->label(t('CSV File'), 'file') ?>
|
||||
<?= $this->form->file('file', $errors) ?>
|
||||
|
||||
<?php if ($max_size > 0): ?>
|
||||
<p class="form-help"><?= t('Maximum size: ') ?><?= is_integer($max_size) ? $this->text->bytes($max_size) : $max_size ?></p>
|
||||
<?php endif ?>
|
||||
|
||||
<?= $this->modal->submitButtons(array('submitLabel' => t('Import'))) ?>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user