Android 从firebase存储加载图像,不带图像扩展

Android 从firebase存储加载图像,不带图像扩展,android,firebase,firebase-storage,android-glide,Android,Firebase,Firebase Storage,Android Glide,我正在使用这段代码从firebase存储下载图像 val storageRef = App.fbStorage.getReferenceFromUrl(CATEGORY_ICONS_BUCKET) .child(patientInformation.imageName+ IMAGE_PNG) GlideApp.with(context).load(storageRef) .placeholder(

我正在使用这段代码从firebase存储下载图像

val storageRef = App.fbStorage.getReferenceFromUrl(CATEGORY_ICONS_BUCKET)
                .child(patientInformation.imageName+ IMAGE_PNG)
                 GlideApp.with(context).load(storageRef)
                 .placeholder(R.drawable.ic_image_placeholder)
                 .into(infoImageView)
如果我在上面的代码中提供了像image_PNG这样的图像格式,那么这个方法可以很好地工作,并且可以检索图像。从实时数据库中,我只有图像名称,没有图像扩展名。我有可能有png或jpg或jpeg格式的图像。我是否可以通过只提供名称而不提供图像扩展名来检索这些图像。我试过这样做

App.fbStorage.getReferenceFromUrl(CATEGORY_ICONS_BUCKET)
                    .child(patientInformation.imageName)

但它不起作用

您需要知道存储中对象的完整路径才能使用它。没有自动通配符或猜测名称。如果您不知道完整路径,并且只知道其中的一个前缀,则可以使用列出具有公共前缀的文件,然后从中开始工作。

我尝试使用“提供”链接,但获取listRef.listAll的未解析引用