/** * Load from request * * @param string $key Key in $_FILES service array * * @return boolean */ public function loadFromRequest($key) { if (!$this->s3Forbid && $this->getS3()) { $result = false; $path = \Includes\Utils\FileManager::moveUploadedFile($key, LC_DIR_TMP); if ($path) { $result = $this->loadFromLocalFile($path, $_FILES[$key]['name']); \Includes\Utils\FileManager::deleteFile($path); } else { \XLite\Logger::getInstance()->log('The file was not loaded', LOG_ERR); } } else { $result = parent::loadFromRequest($key); } return $result; }