You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
storageReference = mRef.child("Images").child(mAuth.getCurrentUser().getUid()).child(image_name);
UploadTask uploadTask = storageReference.putBytes(data);
uploadTask.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task>() { @OverRide
public Task then(@nonnull Task<UploadTask.TaskSnapshot> task) throws Exception {
return storageReference.getDownloadUrl();
}
}).addOnCompleteListener(new OnCompleteListener() { @OverRide
public void onComplete(@nonnull Task task) {
if (task.isSuccessful()) {
Uri downloadUri = task.getResult();
//It will return the downloadUrl;
//If i tried to store them in the list
storeImageUrls.add(downloadUri.toString()); // storeImageUrls is a list
}
}
}
//If i upload different images to the storage then different images get uploaded but getting only 1 url and it get stored in the list.
So, if i upload 10 images, the images get uploaded but getting only 1 url stored like 10 images but same url for 10 images stored in the list.
The text was updated successfully, but these errors were encountered:
storageReference = mRef.child("Images").child(mAuth.getCurrentUser().getUid()).child(image_name);
UploadTask uploadTask = storageReference.putBytes(data);
uploadTask.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task>() {
@OverRide
public Task then(@nonnull Task<UploadTask.TaskSnapshot> task) throws Exception {
return storageReference.getDownloadUrl();
}
}).addOnCompleteListener(new OnCompleteListener() {
@OverRide
public void onComplete(@nonnull Task task) {
if (task.isSuccessful()) {
Uri downloadUri = task.getResult();
//It will return the downloadUrl;
//If i tried to store them in the list
storeImageUrls.add(downloadUri.toString()); // storeImageUrls is a list
}
//If i upload different images to the storage then different images get uploaded but getting only 1 url and it get stored in the list.
So, if i upload 10 images, the images get uploaded but getting only 1 url stored like 10 images but same url for 10 images stored in the list.
The text was updated successfully, but these errors were encountered: