在Firestorage关闭时或在iOS的Firestorage中加载预览错误时显示图像的正确方法 [英] Proper way to show image when Firestorage is down or Error loading preview in Firestorage for iOS

查看:61
本文介绍了在Firestorage关闭时或在iOS的Firestorage中加载预览错误时显示图像的正确方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近两天,我从Firestorage控制台收到加载预览错误.

For the last two days, I have been getting Error loading preview from Firestorage console.

两天前它运行良好.但是现在我所有的数据都在图像中加载了.在那些我在图像视图中显示 gif (使用gif解析器)的情况下,应用程序崩溃了.所以我的问题是,

It was working perfectly two days ago. But now all my data is loading in my application except images. And in those cases where I am showing gif (using gif parser) in image view, the application is getting crashed. So my question is,

  1. 即使在Fire Storage控制台中也无法加载图像的原因是什么?
  2. 发生这种情况时,应如何正确处理以加载图像或gif?通过检查 URL Data > 如果data!= nill ?原因URL存在,但未显示图像.非常感谢前进.
  1. What is the reason behind not loading the image even in the Fire storage console?
  2. When this happens, how should I handle this properly to load images or gifs? By checking URL to Data > if data != nill? Cause URL is there, but the image is not showing. Thanks a lot in advance.

推荐答案

几乎可以肯定,因为如内容类型所建议的那样,您上传的文件实际上不是PNG.或者,数据已损坏,因此无法再对其进行解析和显示.

It's almost certainly because the file you've uploaded is not actually a PNG, as the content type suggests. Or, the data has been corrupted, so it can no longer be parsed and displayed.

由于我们不知道您在应用程序中使用什么来显示图像,因此我们无法真正说出您必须执行的操作以确保图像有效,因此您将需要查看以下文档您正在使用的库,假设它具有检测图像渲染错误的方法.

Since we don't know what you're using in your app to display the image, we can't really say what you have to do to make sure the image is valid, so you will want to check the documentation of the library you're using, assuming it has a way to detect errors in the rendering of the image.

这篇关于在Firestorage关闭时或在iOS的Firestorage中加载预览错误时显示图像的正确方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆