public function isUploadedFile($path) { if (!$path) { return false; } if (mb_orig_strpos($path, $this->getUploadTempDir() . '/') !== 0) { return false; } foreach ($this->attrs->files as $file) { if ($file['tmp_name'] === $path) { return true; } } return false; }