Skip to content

Commit

Permalink
Display max upload size
Browse files Browse the repository at this point in the history
  • Loading branch information
stonebuzz authored Feb 22, 2024
1 parent a6904db commit c4a2611
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

### Added

- Display max upload size


### Fixed

- Fix visibility of injection models
Expand Down
2 changes: 1 addition & 1 deletion front/clientinjection.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
}
} else {
Session::addMessageAfterRedirect(
__('The file could not be found', 'datainjection'),
__('The file could not be found (Maybe it exceeds the maximum size allowed)', 'datainjection'),
true,
ERROR,
true
Expand Down
2 changes: 1 addition & 1 deletion front/model.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
Session::setActiveTab('PluginDatainjectionModel', 'PluginDatainjectionModel$4');
} else {
Session::addMessageAfterRedirect(
__('The file could not be found', 'datainjection'),
__('The file could not be found (Maybe it exceeds the maximum size allowed)', 'datainjection'),
true,
ERROR,
true
Expand Down
3 changes: 2 additions & 1 deletion inc/clientinjection.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ public static function showUploadFileForm($options = [])
echo "<tr><th colspan='2'>" . __('File to inject', 'datainjection') . "</th></tr>";

echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Choose a file', 'datainjection') . "</td>";
$size = sprintf(__(' (%1$s)'), Document::getMaxUploadSize());
echo "<td>" . __('Choose a file', 'datainjection') . $size . "</td>";
echo "<td><input type='file' name='filename'>";
echo "<input type='hidden' name='id' value='" . $options['models_id'] . "'>";
echo "</td></tr>";
Expand Down

0 comments on commit c4a2611

Please sign in to comment.