1

I would like to get the list of firebase storage by pyrebase(Python)

how to list every element of storage files in firebase

Above link explain about it. But when I try to use this code, Python show this error message.

files = storage.list_files()
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "C:\Python\lib\site-packages\pyrebase\pyrebase.py", line 439, in list_files
    return self.bucket.list_blobs()
AttributeError: 'Storage' object has no attribute 'bucket'

Code :

storage = firebase.storage()
files = storage.list_files()
for file in files:
    print(storage.child(file.name).get_url(None))
eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Yonghwan Shin
  • 89
  • 2
  • 6

1 Answers1

0

I could succeed this.

In conifg, I added

"serviceAccount": "******.json"

****.json : serviceAccount file

Please refer below URL how can you download serviceAccount Firebase Permission Denied with Pyrebase library

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Yonghwan Shin
  • 89
  • 2
  • 6