LoginSignup
3
0

More than 1 year has passed since last update.

【Firebase】 storageに画像アップロードしようとして怒られた(403エラー)

Posted at

はじめに

Firebase + Reactベースのアプリケーションを作っているときに、画像アップロードしよーっと思って、アップロードしたら

Firebase Storage: User does not have permission to access 'hoge.jpg'.(storage/unauthorized)

と怒られたので対応した自分用メモ。

解決

以下の場所で

https://console.firebase.google.com/project/{userprojectname}/storage/{userprojectname}.appspot.com/rules

以下を設定すると動いた。

service firebase.storage {
  match /b/{bucket}/o {
    match /{allPaths=**} {
      allow read, write: if request.auth != null;
    }
  }
}

ちゃんとドキュメントのルール見てくれってことですね。

3
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
3
0