public function addMediaFromUrl(string $url)
{
if (!($stream = @fopen($url, 'r'))) {
throw FileCannotBeAdded::unreachableUrl($url);
}
$tmpFile = tempnam(sys_get_temp_dir(), 'media-library');
file_put_contents($tmpFile, $stream);
$filename = basename(parse_url($url, PHP_URL_PATH));
return app(FileAdderFactory::class)->create($this, $tmpFile)->usingName(pathinfo($filename, PATHINFO_FILENAME))->usingFileName($filename);
}