From 1dfac3ad63017071cca551a3e7f557da3f6d24aa Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Fri, 24 Jun 2016 15:53:23 +0200 Subject: [PATCH] Allow getting filesize by function --- classes/File.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/classes/File.php b/classes/File.php index c85d919fd7..1a38aefa72 100644 --- a/classes/File.php +++ b/classes/File.php @@ -263,6 +263,11 @@ class File extends Managed_DataObject return self::tryFilename($this->filename); } + public function getSize() + { + return intval($this->size); + } + // where should the file go? static function filename(Profile $profile, $origname, $mimetype) -- 2.39.5