|
@@ 38-44 (lines=7) @@
|
| 35 |
|
return false; |
| 36 |
|
} |
| 37 |
|
foreach ($files AS $fContext) { |
| 38 |
|
if (!empty($this->params['types']) && (strpos($this->params['types'], |
| 39 |
|
$fContext->getClientMediaType()) === false) |
| 40 |
|
) { |
| 41 |
|
$this->errors[] = 'File '.$fContext->getClientFilename().' not allowed type'; |
| 42 |
|
|
| 43 |
|
return false; |
| 44 |
|
} |
| 45 |
|
if (!empty($this->params['minSize']) && ($fContext->getSize() < $this->params['minSize'])) { |
| 46 |
|
$this->errors[] = 'File '.$fContext->getClientFilename().' too small size'; |
| 47 |
|
|
|
@@ 45-49 (lines=5) @@
|
| 42 |
|
|
| 43 |
|
return false; |
| 44 |
|
} |
| 45 |
|
if (!empty($this->params['minSize']) && ($fContext->getSize() < $this->params['minSize'])) { |
| 46 |
|
$this->errors[] = 'File '.$fContext->getClientFilename().' too small size'; |
| 47 |
|
|
| 48 |
|
return false; |
| 49 |
|
} |
| 50 |
|
if (!empty($this->params['maxSize']) && ($fContext->getSize() > $this->params['maxSize'])) { |
| 51 |
|
$this->errors[] = 'File '.$fContext->getClientFilename().' too many size'; |
| 52 |
|
|
|
@@ 50-54 (lines=5) @@
|
| 47 |
|
|
| 48 |
|
return false; |
| 49 |
|
} |
| 50 |
|
if (!empty($this->params['maxSize']) && ($fContext->getSize() > $this->params['maxSize'])) { |
| 51 |
|
$this->errors[] = 'File '.$fContext->getClientFilename().' too many size'; |
| 52 |
|
|
| 53 |
|
return false; |
| 54 |
|
} |
| 55 |
|
} |
| 56 |
|
} |
| 57 |
|
} |