public function getUploadsPath($file = '', $date = null)
    {
        $dateFrag = $date !== null ?
            $this->buildDateFrag($date)
            : '';

        $uploads = Utils::untrailslashit($this->config['uploads']);
        $path = $file;
        if (false === strpos($file, $uploads)) {
            $path = implode(DIRECTORY_SEPARATOR, array_filter([
                $uploads,
                $dateFrag,
                Utils::unleadslashit($file),
            ]));
        }

        return $path;
    }