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());
– Robson Sisnande
What error appears in?
– Costamilam
An Unknown error occurred, Please check the HTTP result code and Inner Exception for server Response.
– Robson Sisnande
checks whether
acct.getPhotoUrl()
is a valid Uri and tries to use theputFile
passing a file– Costamilam
I can load this Uri into an Imageview with Picasso! I’ll keep looking for a solution.
– Robson Sisnande
So the problem is either in the return of
acct.getPhotoUrl()
or the "SinceputFile
accepts Uri as parameter" not quite so, a look at the official documentation, will help– Costamilam
Thanks William, I’ll check!
– Robson Sisnande