Skip to content

Commit

Permalink
Merge pull request #86 from SilbinaryWolf/fix-maxfilesize
Browse files Browse the repository at this point in the history
fix(Validator): Update validator with max file size
  • Loading branch information
Aaron Carlino authored Jul 7, 2017
2 parents bd14e95 + 16d0123 commit fb00c68
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/FileAttachmentField.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,10 @@ public function setMultiple($bool) {
*/
public function setMaxFilesize($num) {
$this->settings['maxFilesize'] = $num;

$validator = $this->getValidator();
if ($validator) {
$validator->setAllowedMaxFileSize($num.'m');
}
return $this;
}

Expand Down

0 comments on commit fb00c68

Please sign in to comment.