public static function getPathFromContent(ElementFile $content, $folder_size = 3)
    {
        if (null === $content->getUid()
                || null === $content->originalname) {
            throw new InvalidArgumentException('Enable to compute path, the provided element file is not yet initialized');
        }

        $folder = '';
        $filename = $content->getUid();
        if (null !== $draft = $content->getDraft()) {
            $filename = $draft->getUid();
        }

        if (0 < $folder_size && strlen($filename) > $folder_size) {
            $folder = substr($filename, 0, $folder_size).'/';
            $filename = substr($filename, $folder_size);
        }

        $extension = File::getExtension($content->originalname, true);

        return $folder.$filename.$extension;
    }