public function serialize(File $file)
    {
        $options = [
            'id' => $file->getId(),
            'size' => $file->getSize(),
            'autoDownload' => $file->getAutoDownload(),
            'commentsActivated' => $file->getResourceNode()->isCommentsActivated(),
            'hashName' => $file->getHashName(),

            // We generate URL here because the stream API endpoint uses ResourceNode ID,
            // but the new api only contains the ResourceNode UUID.

            // NB : This will no longer be required when the stream API will use UUIDs
            'url' => $this->router->generate('claro_file_get_media', [
                'node' => $file->getResourceNode()->getId(),
            ]),
        ];

        return $options;
    }