Skip to content
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

How to retrieve the firebase url of files after upload ? #18

Open
aasmoth opened this issue Jan 20, 2022 · 3 comments
Open

How to retrieve the firebase url of files after upload ? #18

aasmoth opened this issue Jan 20, 2022 · 3 comments

Comments

@aasmoth
Copy link

aasmoth commented Jan 20, 2022

Hi there,

I found a way to get the name and fullpath of uploaded files, but I'm still searching for retrieving the url of those files.

How can I get the getDownloadURL() value ?

Thanks a lot

@heloise-viegas
Copy link

Hi,
Are you using something like this ?

`Future downloadURLExample() async {
String downloadURL = await firebase_storage.FirebaseStorage.instance
.ref('users/123/avatar.jpg')
.getDownloadURL();

// Within your widgets:
// Image.network(downloadURL);
}`

https://firebase.flutter.dev/docs/storage/usage/

@aasmoth
Copy link
Author

aasmoth commented Jan 21, 2022

Hi,
Thank you. I did it like that and it should work but, as it's impossible here to use the await typecasting,, it doesn't.

I can't use UploadTask uploadTask = storageReference.putFile(FileImage); to get url like this downloadURL = await (await uploadTask).ref.getDownloadURL();

So, I get the error Error getting App Check token; using placeholder token instead. Error: com.google.firebase.Firebase and I have to use this GRRRR Appcheck and his very very poor flutter documentation. Actually, I don't know how to implement this and I stuck with this :)

@heloise-viegas
Copy link

Hey,
Sorry that didn't help you.
I'm actually a beginner in both Flutter and Open source.
I was just hoping to find something to contribute to .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants