LoginSignup
1
0

More than 1 year has passed since last update.

Firebase Storageで処理がタイムアウトしないよー

Posted at

はじめに

Firebase Storage、アプリから便利に使ってますが、オフライン時に処理が全くタイムアウトしないことが発覚:joy:

まあなんとかなったので、ご報告

どうやる?

iOSは

    FIRStorage *storage = [FIRStorage storage];
    const int timeout=5;    //5秒
    storage.maxOperationRetryTime=timeout;

これはdeleteするとき。Operation以外にUploadとDownloadもある。リトライだけど5秒で終わる。

androidは

        FirebaseStorage storage = FirebaseStorage.getInstance();
        final long timeoutMS = 5000;    //5秒
        storage.setMaxDownloadRetryTimeMillis(timeoutMS);

なぜかdeleteはDownloadの方:sweat_smile: おいおい。

最後に

アップロード・ダウンロードのタイムアウト、デフォルトは10分ですって。巨大ファイルの時もあるので、まあいいのかな。

今回も手抜き。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0