From 0dda5b8c12573779a1e2b7e820284dafe04956e3 Mon Sep 17 00:00:00 2001 From: emkael Date: Mon, 25 Apr 2016 12:13:33 +0200 Subject: * splitting traits for safer file upload components --- app/php/components/SafeFileUploadMethods.php | 32 ---------------------------- 1 file changed, 32 deletions(-) delete mode 100644 app/php/components/SafeFileUploadMethods.php (limited to 'app/php/components/SafeFileUploadMethods.php') diff --git a/app/php/components/SafeFileUploadMethods.php b/app/php/components/SafeFileUploadMethods.php deleted file mode 100644 index bdb2af6..0000000 --- a/app/php/components/SafeFileUploadMethods.php +++ /dev/null @@ -1,32 +0,0 @@ -_isSecure; - } - - public function setIsSecure($bool) { - $this->_isSecure = $bool; - } - - public function getFileType() { - if ($this->getIsSecure()) { - $fileInfo = new finfo(FILEINFO_MIME_TYPE); - return $fileInfo->file($this->getLocalName()); - } - return parent::getFileType(); - } - - public function getFileSize() { - if ($this->getIsSecure()) { - return filesize($this->getLocalName()); - } - return parent::getFileSize(); - } - -} - -?> -- cgit v1.2.3