B4A Library FirebaseStorage - Simple file storage backend

Status
Not open for further replies.
D

Deleted member 103

Guest
Hi,
I try to time this example, of course, I changed the "bucket" and Pakage name, but there is always at "Downoad Public" this error message:
(StorageException) com.google.firebase.storage.StorageException: User does not have permission to access this object.

 

freedom2000

Well-Known Member
Licensed User
Longtime User
Sorry Erel, but I do not understand where and how.
Go in forebase console
select your project
click on storage
select "rules tab"

project package name is pointed by the arrow



add the rules you want
Here is says :
everybody can read
everybody can write only in public/field1/fileId path provided that the file is less than 45 bytes (which is quite small !!!) and its name is 1.txt
 
D

Deleted member 103

Guest
Hi freedom2000 ,

my rulle looks but does not work anyway.
 

freedom2000

Well-Known Member
Licensed User
Longtime User
With your rule you must be authenticated (look for firebase Auth)

Just to be sure, you should try with

allow read, write

without any restriction
 
D

Deleted member 103

Guest
without any restriction ?
Then everyone can read and change the data of all, or I did not understand for what firebase well.
 

freedom2000

Well-Known Member
Licensed User
Longtime User
No it was just for you to be sure that it worked !
Just to check your configuration
 

freedom2000

Well-Known Member
Licensed User
Longtime User
by the way I think that you are not allowed to write at the root of firebase

you should add a path
match /something/{allPaths**}
 
D

Deleted member 103

Guest
Error message:
Activity (main) Resume **(StorageException) com.google.firebase.storage.StorageException: Object does not exist at location.

B4X:
Sub btnDownloadPublic_Click
    'You need to first upload a file from Firebase console.
    Starter.storage.DownloadFile("/public/somefile", File.DirInternalCache, "out.txt")
End Sub

FirebaseStorage:


The rules is the same as from the first post, only with my bucket.

Note, I use your example of the first page, I just changed the bucket and "google-services.json files".
 
D

Deleted member 103

Guest
Danke Manfred!
Ich habe es gewusst dass es nur eine kleinigkeit sein kann.
Ich habe einfach den Beispiel von Erel verwendet ohne Änderung.
Jetzt bleibt nur noch die Frage, warum die Authentifizierung nicht funktioniert?

Thanks Manfred!
I knew it that it can only be a trifle.
I have just the example of Erel used without modification.
Now the question remains, why the authentication does not work?
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…