public function onPreFileDownload(PreFileDownloadEvent $event)
    {
        $protocol = parse_url($event->getProcessedUrl(), PHP_URL_SCHEME);

        if ($protocol === 's3') {
            $s3RemoteFilesystem = new S3RemoteFilesystem(
                $this->io,
                $this->composer->getConfig(),
                $event->getRemoteFilesystem()->getOptions(),
                $this->getClient()
            );
            $event->setRemoteFilesystem($s3RemoteFilesystem);
        }
    }