common/models/resources/File.php
public function resetSize() {

		$filePath	= $this->getFilePath();

		if( $filePath && file_exists( $filePath ) && is_file( $filePath ) ) {

			$size		= filesize( $filePath ); // bytes
			$sizeInMb	= $size / pow( 1024, 2 );

			$this->size = round( $sizeInMb, 4 ); // Round upto 4 precision, expected size at least in kb
		}
	}
public function resetSize() {

		$filePath	= $this->getFilePath();

		if( $filePath && file_exists( $filePath ) && is_file( $filePath ) ) {

			$size		= filesize( $filePath ); // bytes
			$sizeInMb	= $size / pow( 1024, 2 );

			$this->size = round( $sizeInMb, 4 ); // Round upto 4 precision, expected size at least in kb
		}
	}
public function resetSize ( ) { $ filePath = $ this -> getFilePath ( ) ; if ( $ filePath && file_exists ( $ filePath ) && is_file ( $ filePath ) ) { $ size = filesize ( $ filePath ) ; // bytes $ sizeInMb = $ size / pow ( 1024 , 2 ) ; $ this -> size = round ( $ sizeInMb , 4 ) ; // Round upto 4 precision, expected size at least in kb } }
Calculate and set the file size in MB.

@return void
Calculate and set the file size in MB .