2017-12-15 7 views
0

Firebase Storage에서 이미지를 가져 오는 데 문제가 있습니다. 오류 메시지가 표시됩니다.Firebase : 사용자에게이 개체에 접근 할 수있는 권한이 없습니다.

com.google.firebase.storage.StorageException : 사용자에게이 개체에 대한 액세스 권한이 없습니다.

firebase의 권한을 다음으로 변경했으며 그 중 아무 것도 작동하지 않습니다.

1.

service firebase.storage { 
    match /b/wics-application.appspot.com/o { 
    match /public/{allPaths=**} { 
     allow read, write: if request.auth == null; 
    } 
    match /user/{allPaths=**} { 
     allow read, write: if request.auth == null; 
    } 
    match /auth/{allPaths=**} { 
     allow read, write: if request.auth == null; 
    } 
    } 
} 

2.

service firebase.storage { 
    match /b/wics-application.appspot.com/o { 
    match /{allPaths=**} { 
     allow read, write; 
    } 
    } 
} 

나는이 메시지를 받고있을 수있는 다른 이유가 ?

+1

는 사용자가 인증되지 않았거나 저장 전화? 관련 코드를 표시 하시겠습니까? –

답변

0

FirebaseUser의 인스턴스를 만들었습니까?

FirebaseAuth mAuth; 
FirebaseUser mUser; 

에서 onCreate 위 및

mAuth = FirebaseAuth.getInstance(); 
mUser = mAuth.getCurrentUser(); 

에서 onCreate

에서 다음