| @@ -22,14 +22,16 @@ | ||
| 22 | 22 | |
| 23 | 23 | const TYPE = 'file'; |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | - * @param $name | |
| 26 | + * @param string $name | |
| 27 | + * | |
| 28 | + * @since 2.16.0 File size unit is bytes, so no need to convert WordPress max file upload size to kilo bytes. | |
| 27 | 29 | */ |
| 28 | 30 | public function __construct( $name ) { |
| 29 | 31 | parent::__construct( $name ); |
| 30 | 32 | |
| 31 | - $this->validationRules->rule( 'maxSize', wp_max_upload_size() / 1024 ); // in kb | |
| 33 | + $this->validationRules->rule( 'maxSize', wp_max_upload_size() ); // in bytes | |
| 32 | 34 | $this->validationRules->rule( 'allowedTypes', get_allowed_mime_types() ); |
| 33 | 35 | } |
| 34 | 36 | |
| 35 | 37 | /** |