Open adivaste opened 2 years ago
storage.child(folder_name).list_files()
Still Unable to extract files from particular folder, giving the same Object as output for both of the lines... ( Listing whole files from Firebase Storage )
firebaseFiles = storage.list_files()
firebaseFiles = storage.child("chartjs").list_files()
Please add service account json file as shown in picture. Then only the method will work,
files = storage.child("pictures").list_files()
for f in files:
print(f)
p.s. After I have searched for a while, I found out the method used in pyrebase is deprecated, so you can only list all the files in the storage, not files from just one folder. Even if you use storage.child(folder).list_files()
, it will still show all the files in the whole storage.
If you want files only from a particular folder, you can use this, where the prefix is your folder name followed by a /.
files = storage.bucket.list_blobs(prefix="folder_name/")
for f in files:
print(f)
Yeah, I was doing it with a similar kind of method, but in this way, it might take a little more time. btw thanks for it...
I wanna extract all the files in the particular firebase folder, how can I do ?