How to use Firebase Storage to upload to existing Google cloud storage bucket? -


from documentation, https://firebase.google.com/docs/storage/web/upload-files can upload files bucket created , managed firebase (using default app engine project managed firebase)

but how use firebase use existing storage bucket, not managed firebase (though has admin access same google cloud account used create firebase app)?

initialize dedicated instance of app using firebase.initializeapp(). should able tell storage bucket want use when dealing app. note going separate default firebase app, , have call out every time want use it.

from api docs linked above:

// initialize app var otherapp = firebase.initializeapp({   databaseurl: "https://<other_database_name>.firebaseio.com",   storagebucket: "<other_storage_bucket>.appspot.com" }, "otherapp"); 

then should able access storage otherapp suggested in firebase.storage():

firebase.storage(otherapp) 

Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -