-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[firebase_storage] Include List API. #83
Comments
This seems like a good idea! I don't have a timeline on implementation but PRs would be most welcome. |
I am also surprised I cannot list all files in the bucket. Is there any way I can do this with firebase_storage: ^3.0.6? |
I use metadata. Say you want to list all the articles in a folder. You can have a file named, say, |
Any news on this? Having to track all the filenames my users upload to know them in advance is a huge pain. If I could just list the filenames in a bucket or folder, that would be extremely helpful |
Well it seems that #232 is working on this. It's almost done, just some minor cleanup needed. Fair warning it doesn't lazy load -- all filenames are loaded in memory at once. Only a problem if you have literally thousands of files in the same folder. |
That would probably be the case most of the time with user-generated content. |
Yep, totally agree, at least I'm lucky enough to not have that particular issue. According to the PR:
|
Won't be an issue for me thankfully. Can't imagine having more than 15 files in the same folder. Thanks for the responses |
How is this not possible yet? I don't understand the point of folders if I cannot simply get the files inside the folder. I might just throw the images into firestore documents if this can't be done |
You can use this until the PR is merged:
|
@collinjackson and @kroikie, @danysz has made a PR over at #232 that solves this issue any chance it can be merged? |
This seems like a fairly basic functionality, critical to most applications using Storage. Is there anything holding up the merge? |
It's like 8 months since I made it. They just made me to stop publishing and contributing to the "flutter/firebase" community. Sorry |
No worries, I was aiming the question more at the Google people in charge of the repository. |
I am sure is working fine, I have it in apps which are published both on
Android and iOS for production and with users.
DANIEL SZASZ
CTO & Co-Founder
From: Zalán Meggyesi <notifications@github.com> <notifications@github.com>
Reply: FirebaseExtended/flutterfire
<reply@reply.github.com>
<reply@reply.github.com>
Date: 15 May 2020 at 16:54:53
To: FirebaseExtended/flutterfire <flutterfire@noreply.github.com>
<flutterfire@noreply.github.com>
Cc: Daniel Szasz <danysz@gmail.com> <danysz@gmail.com>, Mention
<mention@noreply.github.com> <mention@noreply.github.com>
Subject: Re: [FirebaseExtended/flutterfire] [firebase_storage] Include
List API. (#83)
No worries, I was aiming the question more at the Google people in charge
of the repository.
From what I can tell after testing it on Android, it works fine, so I'd
love to see it in the official package.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#83 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAMXGQDUJNZCFAOXNA3QIALRRVCSZANCNFSM4ITKB3HQ>
.
|
OK, Google, I need this now. Please don't make me resort to JavaScript. |
@collinjackson What's holding up this PR? People need this functionality, and there's a solution for it - what's keeping Google from merging this? |
Can someone please review the PR? We need this functionality. |
God help us all. So we need to keep track of our own files? |
What I had is a .txt file in each directory with the names of all the files inside, and used cloud functions to keep it up-to-date. Also, courtesy of @Hannnes1 above:
|
@kroikie do you think you could champion this PR for integration? People are looking for this functionality, and having to resort to all sorts of workarounds to get it. |
Yup. One implementation I wrote cloud functions which update firestore documents to keep track of all the file names. In another, I just wrote the small images as base64 to firestore documents directly and avoided firebase storage entirely. I have no idea how they intend one device to upload a photo, and another to download it, if you need the exact filename. You need another system to keep track of the file names, or you need to name the files in a very precise way where you can know the filename based on what it might be associated with. |
Keep in mind this feature does exist in Firebase, just hasn't been ported over to Flutter yet. And it's happening soon (although it did take a VERY long time). They're completely reworking most if not all of the Firebase plugins so they're not gonna use that specific PR but it's in the works. |
@Levi-Lesches Do you have any infos regarding an ETA? |
The original PR was #232, but it got moved (with a different implementation) under the new reworks to https://github.com/invertase/flutterfire/pull/53, but it's marked as a work in progress. According to a medium article:
So they're probably picking up the pace now. |
Any Updates? It's about a year now. |
They made good progress recently. |
https://github.com/invertase/flutterfire/pull/53 has merged! Only a matter of time until it gets merged to this repo as well. |
Follow #3612 for progress |
@Levi-Lesches Thank you so much for pushing this! |
Hey all, as @Levi-Lesches mentioned above, our rework PR is up at #3612 and is now going through dev release cycles. A Thanks |
Is your feature request related to a problem? Please describe.
As described in the Firebase docs, the List API allows the client to list all files and subdirectories inside a given folder. This is very helpful for when the contents of a directory are not known in advance, and avoids temporary workarounds (such as a Cloud Function that populates an index in Cloud Firestore)
Describe the solution you'd like
A
list
andlistAll
method forStorageReference
that provides access to the List APIs.Additional context
Again, this removes the need for complicated and buggy workarounds, as well as minimizing the connection between Firebase services -- by introducing users to Cloud Function and Cloud Firestore, chances are something will go wrong as opposed to simply using Cloud Storage.
The text was updated successfully, but these errors were encountered: