public function moveTo($to, $filename = null)
    {
        if (!isset($this->file['tmp_name'])) {
            return false;
        }

        if (!is_null($filename)) {
            $filename = $this->getHashName();
        }

        if (!is_dir($to)) {
            @mkdir($to, 0777, true);
        }

        $resolve = rtrim($to, '/').'/'.$filename;

        return (bool) move_uploaded_file($this->file['tmp_name'], $resolve);
    }