React

[firestore에러] Firebase Storage: An unknown error occurred, please check the error payload for server response

Judith Hopps 2022. 9. 23. 13:19
반응형

문제점: 

파이어 스토어에 이미지 업로드를 할 수 없다.

 

이유 :

파이어스토어의 보안 규칙이 업로드를 제한하고 있기 때문이다.

 

해결방법 :

파이어 스토어 >> 콘솔 >> 빌드 >> storage >> Rules 에 들어가

규칙을 아래와 같이 수정해준다. 

 

rules_version = '2';
service firebase.storage {
    match /b/{bucket}/o {
        match /{allPaths=**} {
            allow read, write: if true;
    }
  }
}

 

그럼 사진이 저장이 되는 것을 확인할 수 있다.

 

 

참고 사이트

https://stackoverflow.com/questions/70052479/firebase-storage-an-unknown-error-occurred-please-check-the-error-payload-for

 

Firebase Storage: An unknown error occurred, please check the error payload for server response

I am trying to create a Vue Composable that uploads a file to Firebase Storage. To do this I am using the modular Firebase 9 version. But my current code does not upload anything, and instead returns

stackoverflow.com

 

반응형