public function getWebPath() { $file = $this->getAbsolutePath(); if (is_file($file) && file_exists($file)) { return FRONTEND_FILES_URL . '/' . $this->getTrimmedUploadDir() . '/' . $this->fileName; } return ''; }