lib/Operation/SaveOperation.php 1 location
|
@@ 159-166 (lines=8) @@
|
| 156 |
|
|
| 157 |
|
$max_file_size = $this->app->registry["{$this->module->flat_id}.max_file_size"] * 1024; |
| 158 |
|
|
| 159 |
|
if ($max_file_size && $max_file_size < $file->size) |
| 160 |
|
{ |
| 161 |
|
$error_message = $errors->add( |
| 162 |
|
File::HTTP_FILE, |
| 163 |
|
"Maximum file size is :size Mb", |
| 164 |
|
[ ':size' => round($max_file_size / 1024) ] |
| 165 |
|
); |
| 166 |
|
} |
| 167 |
|
|
| 168 |
|
if ($this->accept && !$file->match($this->accept)) |
| 169 |
|
{ |
lib/Operation/UploadOperation.php 1 location
|
@@ 94-102 (lines=9) @@
|
| 91 |
|
|
| 92 |
|
$max_file_size = $this->app->registry["{$this->module->flat_id}.max_file_size"] * 1024; |
| 93 |
|
|
| 94 |
|
if ($max_file_size && $max_file_size < $file->size) |
| 95 |
|
{ |
| 96 |
|
$error_message = null; |
| 97 |
|
$errors->add( |
| 98 |
|
File::HTTP_FILE, |
| 99 |
|
"Maximum file size is :size Mb", |
| 100 |
|
[ ':size' => round($max_file_size / 1024) ] |
| 101 |
|
); |
| 102 |
|
} |
| 103 |
|
|
| 104 |
|
if (!$file->match($this->accept)) |
| 105 |
|
{ |