我能够将图像插入到firebase.storage中,但我获得的下载链接与上传时附加到图像的下载链接不同。
public void UploadImage()
{
if (filePath != null)
progressBar.Visibility = ViewStates.Visible;
var images = storageRef.Child("profilePicture");
images.PutFile(filePath);
}
void IOnSuccessListener.OnSuccess(Java.Lang.Object result)
{
var snapShot = (UploadTask.TaskSnapshot)result;
var downloadURL = snapShot.DownloadUrl.Scheme
+ ":" + snapShot.DownloadUrl.SchemeSpecificPart;
}
UserData newUser = new UserData();
newUser.UserId = UserId;
newUser.Email = UserEmail;
newUser.FirstName = first.Text;
newUser.LastName = last.Text;
newUser.MobileNumber = phone.Text;
newUser.Userprofile = storageRef.DownloadUrl;