Skip to content

Commit 8bfa185

Browse files
committed
replace getClientSize, which was removed in Symfony 5
1 parent 48d7718 commit 8bfa185

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/GuillermoMartinez/Filemanager/Filemanager.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -594,19 +594,19 @@ function ($a, $b) {return $b->getMTime() - $a->getMTime();}
594594
*/
595595
public function upload($file,$path){
596596
if( $this->validExt($file->getClientOriginalName())){
597-
if($file->getClientSize() > ($this->getMaxUploadFileSize() * 1024 * 1024) ){
597+
if($file->getSize() > ($this->getMaxUploadFileSize() * 1024 * 1024) ){
598598

599-
$result = array("query"=>"BE_UPLOAD_FILE_SIZE_NOT_SERVER","params"=>array($file->getClientSize()));
599+
$result = array("query"=>"BE_UPLOAD_FILE_SIZE_NOT_SERVER","params"=>array($file->getSize()));
600600
$this->setInfo(array("msg"=>$result));
601601

602-
if( $this->config['debug'] ) $this->_log(__METHOD__." - file size no permitido server: ".$file->getClientSize());
602+
if( $this->config['debug'] ) $this->_log(__METHOD__." - file size no permitido server: ".$file->getSize());
603603
return ;
604-
}elseif($file->getClientSize() > ($this->config['upload']['size_max'] * 1024 * 1024) ){
604+
}elseif($file->getSize() > ($this->config['upload']['size_max'] * 1024 * 1024) ){
605605

606-
$result = array("query"=>"BE_UPLOAD_FILE_SIZE_NOT_PERMITIDO","params"=>array($file->getClientSize()));
606+
$result = array("query"=>"BE_UPLOAD_FILE_SIZE_NOT_PERMITIDO","params"=>array($file->getSize()));
607607
$this->setInfo(array("msg"=>$result));
608608

609-
if( $this->config['debug'] ) $this->_log(__METHOD__." - file size no permitido: ".$file->getClientSize());
609+
if( $this->config['debug'] ) $this->_log(__METHOD__." - file size no permitido: ".$file->getSize());
610610
return ;
611611
}else{
612612
if($file->isValid()){

0 commit comments

Comments
 (0)