Image Google profile in Firebase Firestorage

Asked

Viewed 32 times

0

I’m having trouble with the following code:

StorageReference imagemRef = storageReference
        .child("imagens")
        .child("perfil")
        .child(Jogador.uid + ".jpeg");

UploadTask uploadTask = imagemRef.putFile(acct.getPhotoUrl());

Where acct is GoogleSignInAccount which returns to Uri from the google profile image. Can anyone tell me what’s wrong? Since "putFile" accepts Uri as a parameter.

  • Error occurs in imagemRef.putFile(acct.getPhotoUrl());

  • What error appears in?

  • An Unknown error occurred, Please check the HTTP result code and Inner Exception for server Response.

  • checks whether acct.getPhotoUrl() is a valid Uri and tries to use the putFile passing a file

  • I can load this Uri into an Imageview with Picasso! I’ll keep looking for a solution.

  • So the problem is either in the return of acct.getPhotoUrl() or the "Since putFile accepts Uri as parameter" not quite so, a look at the official documentation, will help

  • Thanks William, I’ll check!

Show 2 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.