菜鸟教程小白 发表于 2022-12-12 20:33:40

ios - 使用 Firebase 存储下载检测网络中断


                                            <p><p>我正在使用 Firebase iOS SDK,并且正在使用“dataWithMaxSize”方法将图像下载到内存中。网络连接良好时下载正常,但如果没有网络连接,则下载任务将无限期继续,不会调用错误回调。似乎在 <a href="https://stackoverflow.com/questions/37499262/firebase-storage-handling-network-interruptions-when-download-in-progress" rel="noreferrer noopener nofollow">this</a> 中发现了同样的问题所以在使用 Firebase Android SDK 的地方发布。如果有人能在这个问题上提供一些帮助,我将不胜感激。</p>

<p>谢谢</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>我已经用各种 <code>TimeInterval</code> (30, 20, 10, 8, 5, 2, 1) 设置 <code>maxUploadRetryTime</code> 进行了许多测试,我可以确认设置 <code>maxUploadRetryTime = 1.0</code> 只会触发超时失败 block 。</p>

<p>一些日志:</p>

<p><code>2017-05-03 21:15:17.922 upload(uploadData:) > 开始上传超时:1.0
</code></p>

<p><code>2017-05-03 21:15:18.170 [详细] upload(uploadData:) > 上传失败</code></p>

<p>这是一个非常意外的行为,我不确定他们是否意识到这一点。目前我正在使用 <code>Firebase/Database (3.17.0)</code></p>

<p>更新:</p>

<p>我向 Firebase 团队提交了一个错误,他们已确认该问题。报告编号:<code>8-2338000016926</code></p></p>
                                   
                                                <p style="font-size: 20px;">关于ios - 使用 Firebase 存储下载检测网络中断,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/37800287/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/37800287/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: ios - 使用 Firebase 存储下载检测网络中断