private function randomFileName()
    {
        $fileName = '';

        // Generate the datetime format file name
        if ($this->randomNameType == 1)
        {
            date_default_timezone_set($this->timezone);

            $date     = date($this->randomLength);
            echo $dir      = $this->savePath . $date;

            if ( !file_exists($dir) ) {
                mkdir($dir, $this->mode, true);
            }

            $fileName = $date . '/' . time();
        }
        elseif ($this->randomNameType == 2)    // Generate random character file name
        {
            $chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz';
            $max   = strlen($chars) - 1;
            mt_srand( (double) microtime() * 1000000);

            for ($i = 0; $i < $this->randomLength; $i++)
            {
                $fileName .= $chars[mt_rand(0, $max)];
            }
        }
        else
        {
        }

        $this->fileExt = $this->getFileExt($this->files["name"]);

        $fileName = $fileName . '.' . $this->fileExt;

        return $fileName;
    }