Uploader/Uploader.php
public function generatePath($filename)
    {
        do {
            $hash = md5(uniqid(mt_rand()));
            $path = sprintf(
                '%s/%s/%s',
                substr($hash, 0, 3),
                substr($hash, 3, 3),
                $filename
            );
        } while ($this->mountManager->has(sprintf('%s://%s', $this->targetFileSystem, $path)));

        return $path;
    }
public function generatePath($filename)
    {
        do {
            $hash = md5(uniqid(mt_rand()));
            $path = sprintf(
                '%s/%s/%s',
                substr($hash, 0, 3),
                substr($hash, 3, 3),
                $filename
            );
        } while ($this->mountManager->has(sprintf('%s://%s', $this->targetFileSystem, $path)));

        return $path;
    }
{@inheritdoc}