如何获取此链接的网址?
答案 0 :(得分:0)
您所指的就是文件的下载URL。要获取该URL,您需要按照accessing a file through a URL上的说明进行操作:
StorageReference photoRef = storageRef.child("path/to/photo2.jpg");
photoRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {
@Override
public void onSuccess(Uri uri) {
System.out.println(uri.toString());
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception exception) {
throw exception
}
});