I would like to get the download URL from a file (Blob) upload by firebase-admin sdk for java.
My Code:
FirebaseOptions options = new FirebaseOptions.Builder()
.setCredentials(GoogleCredentials.fromStream(serviceAccount))
.setDatabaseUrl("...")
.build();
FirebaseApp app = FirebaseApp.initializeApp(options);
StorageClient storage = StorageClient.getInstance(app);
Bucket bucket = storage.bucket("...");
Blob blob = bucket.create(...);
so, by this code I am able to upload file in firebase storage. But I dont know how to get the download URL.. I want to get the URL (https://firebasestorage.googleapis.com...)
But the method blob.getMediaLink() returns me the URL (https://www.googleapis.com/download/storage...) which is private